<html lang="zh-CN"
      class=" js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers no-applicationcache svg inlinesvg smil svgclippaths"
      xmlns:th="http://www.w3.org/1999/xhtml">
<head style="">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=0">
    <meta name="format-detection" content="telephone=no">
    <meta name="description"
          content="">
    <meta name="baidu-site-verification" content="code-t0pgjhgFfQ">
    <title>ethPool</title>
    <link rel="shortcut icon" href="/pool/images/favicon.ico" type="image/x-icon">
    <link href="/pool/images/apple-icon-114.png" rel="apple-touch-icon-precomposed">
    <link rel="stylesheet"
          href="/pool/css/bootstrap-4.0.0.min.css"
          type="text/css">
    <link rel="stylesheet"
          href="/pool/css/fontawesome-all.min.css"
          type="text/css">
    <link rel="stylesheet" href="/pool/css/docs_v3.css"
          type="text/css">

    <!--[if lt IE 9]>
    <script src="/pool/js/html5.js"></script><![endif]-->

    <link rel="stylesheet" type="text/css"
          href="/pool/css/classic.css">
    <link rel="stylesheet" type="text/css"
          href="/pool/css/classic.date.css">
    <link rel="stylesheet" href="/pool/css/address.css"
          type="text/css">
    <link rel="stylesheet" type="text/css"
          href="/pool/css/fixedHeader.dataTables.min.css">
    <link rel="stylesheet" href="/pool/css/font-awesome.min.css">
    <!-- Google Tag Manager -->
    <script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script>
    <script async="" src="https://www.googletagmanager.com/gtm.js?id=GTM-PH8KKCQ"></script>
    <script>(function (w, d, s, l, i) {
        w[l] = w[l] || [];
        w[l].push({
            'gtm.start':
                new Date().getTime(), event: 'gtm.js'
        });
        var f = d.getElementsByTagName(s)[0],
            j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
        j.async = true;
        j.src =
            'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
        f.parentNode.insertBefore(j, f);
    })(window, document, 'script', 'dataLayer', 'GTM-PH8KKCQ');
    </script>
    <!-- End Google Tag Manager -->
    <script type="text/javascript">
        if (window.top !== window.self) {
            window.top.location = window.location;
        }
        var ieVer = msieversion();
        if (ieVer && ieVer < 10) {
            alert('浏览器版本过低，请使用Chrome、Firefox等浏览器访问。');
        }

        function msieversion() {
            var ua = window.navigator.userAgent;
            var msie = ua.indexOf("MSIE ");
            if (msie > -1 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
                return parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)));
            }
            return false;
        }
    </script>
    <script src="/pool/js/docs.js"></script>
    <script src="/pool/js/gt.js"></script>
</head>
<body outouchstart="" class=" lang-zh_CN" style="">
<!-- End Google Tag Manager (noscript) -->
<div class="page-wrapper  lang-zh_CN">

    <div class="page-main">

        <script type="text/javascript">
        </script>

        <div class="page-address container-fluid">


            <div class="header row justify-content-center layout-header-in">
                <div class="col-12 col-lg-11 col-xl-10">
                    <div class="mining-user-info-container row justify-content-center ">


                        <div class="row col-12 order-lg-2 row-title">
                            <div class="col-lg-12 item-address text-center readonly" style="word-break: break-all">
                                <span th:text="${priceCnyStr}"></span>
                            </div>
                        </div>


                        <div class="row col-12 order-lg-1 row-revenue">
                            <div class="col-6 col-lg order-lg-1 item ">
                                <h3>
                                    <span class="icon-about order-lg-1" data-toggle="tooltip"
                                          data-container=".mining-user-info-container" title=""
                                          data-original-title="UTC时间0:00到24:00（北京时间昨日8:00到今日8:00）的收益。【8:30更新昨日收益】"></span>
                                    昨日收益<small class="d-none d-lg-block">(ETH)</small>
                                </h3>
                                <div class="item-val">

                                    <div class="line">

                                        <!--                                        <span style="font-size: 14px; font-weight:400">结算中</span>-->
                                        <span th:text="${todayPaid}"></span>
                                    </div>

                                </div>
                            </div>
                            <div class="col-6 col-lg order-lg-3 item ">
                                <h3>
<span class="icon-about order-lg-1" data-toggle="tooltip" data-container=".mining-user-info-container" title=""
      data-original-title="UTC时间今日0:00到现在（北京时间昨日8:00到现在或北京时间今日8:00到现在）"></span>
                                    今日已挖(预估)<small class="d-none d-lg-block">(ETH)</small>
                                </h3>
                                <div class="item-val">
                                    <div class="line"><span th:text="${valueToday }"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="col-6 col-lg order-lg-2 item  col-12 last-item ">
                                <h3><span class="icon-about order-lg-1" data-toggle="tooltip"
                                          data-container=".mining-user-info-container" title="" data-original-title="账户总余额"></span>
                                    <span>帐户总余额</span>
                                    <small>(ETH)</small>
                                </h3>
                                <div class="item-val">

                                    <div class="line" style="position: relative"><span
                                            th:text="${balance}"></span>

                                    </div>

                                </div>
                            </div>

                        </div>


                    </div>

                </div>
            </div>

            <section class="section-address-info row justify-content-center">
                <div class="address-table-container col-12 col-lg-11 col-xl-10 text-center text-lg-left">
                    <div class="list-tab-container d-block d-lg-flex justify-content-between flex-wrap" style="">
                        <ul class="list-tab nav nav-tabs d-inline-block" role="tablist">
                            <li>
                                <a class="nav-link active show" data-toggle="tab" href="#table-payout" role="tab"
                                   data-key="payouts" aria-selected="true">
                                    <span>收益记录</span>
                                </a>
                            </li>

                        </ul>

                        <div class="worker-filter" style="display: none;">
                            <div class="search-input-container">
                                <input type="text" class="form-control d-inline-block search-worker-name"
                                       placeholder="请输入要搜索的矿工 ">
                                <i class="fa fa-search"></i>
                                <i class="fa fa-times-circle icon-clear-search"></i>
                                <button class="btn-normal" type="button">搜索</button>
                            </div>
                        </div>


                        <!--<div class="export-container" style="">
                            <button class="float-right btn btn-normal btn-export" type="button" data-toggle="modal"
                                    data-target="#modalExport" data-currency="eth-address" data-display-code="ETH">
                                导出 <i class="icon-export" style="margin-left: 4px;"></i>
                            </button>
                        </div>-->


                    </div>
                    <div class="tab-content">

                        <div class="tab-pane" id="table-worker" role="tabpanel">
                            <div class="main-content  js-stickybit-parent">

                            </div>
                        </div>


                        <div class="tab-pane payout-table active show" id="table-payout" role="tabpanel">
                            <div id="payouts_wrapper"
                                 class="dataTables_wrapper container-fluid dt-bootstrap4 no-footer">
                                <table id="payouts" class="table dataTable no-footer" cellspacing="0" role="grid"
                                       aria-describedby="payouts_info">
                                    <thead>
                                    <tr role="row">
                                        <th class="sorting_disabled" rowspan="1" colspan="1">日期<span
                                                class="icon-about grey" data-toggle="tooltip" title=""
                                                data-original-title="每日早上8点30分生成收益帐单，收益帐单为过去24小时的挖矿收益。"></span>


                                        </th>
                                        <th class="sorting_disabled" style="text-align: center;" rowspan="1" colspan="1">挖矿时间（小时）
                                        </th>
                                        <th class="amount sorting_disabled" rowspan="1" colspan="1">金额
                                            <span class="icon-about grey" data-toggle="tooltip" title=""
                                                  data-original-title=""></span>
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody>


                                    <tr th:each="ethIncome,ethIncomeStat: ${ethIncomeLists}"
                                        data-record="{&quot;amount_pps&quot;:&quot;0.00717907&quot;,&quot;amount_fee&quot;:&quot;0.00487883&quot;,&quot;payout_time&quot;:&quot;&quot;,&quot;address&quot;:&quot;0x62dd3a1d95db1e4bed53001291bf04c3f689b515&quot;,&quot;currency&quot;:&quot;eth-address&quot;}"
                                        role="row" class="odd">
                                        <td class="date">

                                            <span class="date-val" th:text="${#dates.format(ethIncome.productDate, 'yyyy-MM-dd')}"></span>


                                        </td>
                                        <td class="hashrate d-lg-table-cell" style="text-align: center;">
                                            <span class="miningHours" th:text="${ethIncome.miningHours}"></span>


                                        </td>
                                        <td class="amount">
                                            <div class="d-flex d-lg-block align-items-center justify-content-end">
                                                <div>
                                                    <span th:text="${ethIncome.ethNum}"></span> <span class="unit">ETH</span>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                                <div class="dataTables_info" id="payouts_info" role="status" aria-live="polite">当前页 <span  th:text="${pageNum}"></span>，
                                    总共 <span  th:text="${totalPages}"></span> 页，共 <span  th:text="${totalCount}"></span> 条记录。
                                </div>
                                <div class="dataTables_paginate paging_full_numbers" id="payouts_paginate">
                                    <ul class="pagination">
                                        <li class="paginate_button page-item first" id="payouts_first">
                                            <a th:href="@{|/pool/eth/${userCode}|}"
                                                                                                          aria-controls="payouts"
                                                                                                          data-dt-idx="0"
                                                                                                          tabindex="0"
                                                                                                          class="page-link"><<</a></li>
                                        <li class="paginate_button page-item previous" id="payouts_previous">
                                            <a th:href="@{|/pool/eth/${userCode}|(pageNum=${pageNum>1}?${pageNum - 1}:1)}"
                                                                                                                aria-controls="payouts"
                                                                                                                data-dt-idx="1"
                                                                                                                tabindex="0"
                                                                                                                class="page-link"><</a></li>
                                        <li class="paginate_button page-item "><a
                                                th:href="@{|/pool/eth/${userCode}|(pageNum=${pageNum})}" aria-controls="payouts" data-dt-idx="4" tabindex="0"
                                                class="page-link"><span th:text="${pageNum}"></span></a></li>

                                        <li class="paginate_button page-item next" id="payouts_next"><a
                                                th:href="@{|/pool/eth/${userCode}|(pageNum=${pageNum} < ${totalPages}?${pageNum + 1}:${totalPages})}" aria-controls="payouts" data-dt-idx="4" tabindex="0"
                                                class="page-link">></a></li>
                                        <li class="paginate_button page-item last" id="payouts_last"><a
                                                th:href="@{|/pool/eth/${userCode}|(pageNum=${totalPages})}" aria-controls="payouts" data-dt-idx="5" tabindex="0"
                                                class="page-link">>></a></li>
                                    </ul>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </section>



        </div>

    </div>
    <div class="btn-global-to-top"></div>
</div>

<div class="modal fade modal-global-footer" id="globalFooterModal">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-body">
                <span class="close" data-dismiss="modal" aria-label="Close"></span>
                <div class="container">
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript"
        src="/pool/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript"
        src="/pool/js/popper.min.js"></script>
<script type="text/javascript"
        src="/pool/js/bootstrap-4.0.0.min.js"></script>
<script type="text/javascript"
        src="/pool/js/cookie.js"></script>
<script type="text/javascript"
        src="/pool/js/jquery.simpleTicker.js"></script>
<script type="text/javascript"
        src="/pool/js/big.min.js"></script>
<script type="text/javascript"
        src="/pool/js/currency.js"></script>
<script type="text/javascript">
    $(function () {
        CURRENCY_CONF.language = 'zh_CN';
        CURRENCY_CONF.usd_cny = Number('6.4713' || 6.3);
        Big.DP = 40;
// header-tip
        $.simpleTicker($('#headerTips'), {
            effectType: 'roll',
            delay: 5000,
            speed: 1000
        });
        $('[data-toggle="tooltip"]').tooltip();
        updateHeaderTheme();
// address search
        //updateAddressSearch();
        //bindAddressSearch();

        //getMiningUserHashrate();

        //bindNavbarCollapse();
        bindDropdownClose();
        bindChangeLanguage();
        bindFooter();
        bindScrollToTop();
        setCalculator();
        bindInputGroupEffect();

        bindAppDownload();
        bindAndroidDownload();


        function bindAddressSearch() {
            var $container = $('.global-search-form-container');
            $('#input-address').on('input', updateAddressSearch);
            $container.find('.currency-list-menu a').on('click', function (e) {
                e.preventDefault();
                var currency = $(this).text();
                var urlName = $(this).data('urlname');
                $('#addressSearchForm button[type="submit"]').prop('disabled', $('#input-address').val() === '');
                $('#currency-toggle .btn').text(currency);
                $('#input-currency').val(urlName.toUpperCase());
            });
            $container.find('.icon-clear-search').on('click', function () {
                $('#input-address').val('');
                $(this).hide();
                updateAddressSearch();
            });
        }

// click outside to close dropdown
        function bindDropdownClose() {
            $(document).on('click touchstart', function (e) {
                var $toggle = $('.footer-pop, .btn-app-download-ios, .btn-app-download-android');
                if (!$toggle.is(e.target) && $toggle.has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
                    (($toggle.popover('hide').data('bs.popover') || {}).inState || {}).click = false;
                }
            });
        }

        function bindNavbarCollapse() {
            $('.page-wrapper > .header .navbar-collapse').on('show.bs.collapse', function (e) {
                $(this).parents('.header').addClass('collapse-show');
            }).on('hidden.bs.collapse', function (e) {
                $(this).parents('.header').removeClass('collapse-show');
                updateHeaderClass();
            });
        }

        function updateHeaderTheme() {
            var $headerIn = $('.layout-header-in');
            var $header = $('header.header');
            if ($headerIn.length > 0) {
                $(window).on('scroll', function () {
                    if ($header.hasClass('collapse-show')) return;
                    updateHeaderClass();
                });
            }
        }

        function updateHeaderClass() {
            var $headerIn = $('.layout-header-in');
            var $header = $('header.header');
            if ($(document).scrollTop() >= $headerIn.innerHeight() - ($(window).width() > 991 ? ($('.page-index').length > 0 ? 120 : 10) : 0)) {
                if (!$header.hasClass('header-white')) {
                    $header.addClass('header-white header-fix-top animate');
                    $header.trigger('header.fixtop.on');
                }
            } else {
                if ($header.hasClass('header-white') && !$header.hasClass('header-no-banner')) {
                    $header.removeClass('header-white header-fix-top animate');
                    $header.trigger('header.fixtop.off');
                }
            }
        }

        function updateAddressSearch() {
            var currencyArr = [], urlName, displayCode;
            var regxArr = {
                "bch": "(q[a-zA-Z0-9]{27,60}|[13][a-zA-Z0-9]{27,34})",
                "bsv": "(q[a-zA-Z0-9]{27,60}|[13][a-zA-Z0-9]{27,34})",
                "etc": "(?:0[Xx])?[0-9A-Fa-f]{40}",
                "eth-address": "(0[xX])?[0-9A-Fa-f]{40}",
                "zec": "t[13][1-9A-HJ-NP-Za-km-z]{33}|zc[1-9A-HJ-NP-Za-km-z]{93}",
                "zen": "z[nst][1-9A-HJ-NP-Za-km-z]{33}|zc[1-9A-HJ-NP-Za-km-z]{93}",
                "sc": "[0-9A-Fa-f]{76}",
                "dash": "[7X][1-9A-HJ-NP-Za-km-z]{27,35}",
                "xmr": "[48][1-9A-HJ-NP-Za-km-z]{94,105}(?:\\.[0-9a-fA-F]{16,64})?",
                "dcr": "D[1-9A-HJ-NP-Za-km-z]{27,35}",
                "xzc": "[Za][1-9A-HJ-NP-Za-km-z]{27,35}",
                "rvc": "[Rr][1-9A-HJ-NP-Za-km-z]{33}",
                "hns": "hs1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{39,59}",
                "kda": "[0-9a-z]{64}",
                "chi": "C[a-zA-Z0-9]{27,35}",
                "ckb": "ck[0-9a-zA-Z]+",
                "yec": "s[13][1-9A-HJ-NP-Za-km-z]{33}|zc[1-9A-HJ-NP-Za-km-z]{93}",
                "img": "M[a-zA-Z0-9]{27,35}",
                "sero": "[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{44,}",
                "bcd": "[13][a-zA-Z0-9]{27,34}",
                "clo": "(0[xX])?[0-9A-Fa-f]{40}",
                "zel": "t[13][1-9A-HJ-NP-Za-km-z]{33}|zc[1-9A-HJ-NP-Za-km-z]{93}",
                "vtc": "[3V][0-9A-Za-z]{27,36}|vtc1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{39,59}",
                "beam": "[0-9a-fA-F]{40,90}",
                "hdac": "H[0-9A-Za-z]{27,35}",
                "hyc": "H[0-9A-Za-z]{27,36}",
                "ae": "ak[_0-9A-Za-z]{27,80}",
                "hc": "H[1-9A-HJ-NP-Za-km-z]{27,35}",
                "dgb-sha256d": "[DS][0-9A-Za-z]{27,35}",
                "dgb-scrypt": "[DS][0-9A-Za-z]{27,35}",
                "dgb-skein": "[DS][0-9A-Za-z]{27,35}",
                "dgb-qubit": "[DS][0-9A-Za-z]{27,35}",
                "dgb-odocrypt": "[DS][0-9A-Za-z]{27,35}",
                "mona": "[MP][0-9a-zA-Z]{20,60}",
                "btm": "bm1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]+",
                "xvg-blake2s": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "xvg-scrypt": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "xvg-x17": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "xvg-lyra": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "xvg-groestl": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "pgn": "P[a-zA-Z0-9]{27,34}",
                "rvn": "[Rr][1-9A-HJ-NP-Za-km-z]{33}",
                "rvn-pri": "[Rr][1-9A-HJ-NP-Za-km-z]{33}",
                "aion": "(0[xX])?a[0-9][0-9A-Fa-f]{62}"
            };
            var $container = $('.global-search-form-container');
            var $btnCurrencyToggle = $("#currency-toggle .btn");
            var $inputAddress = $('#input-address');
            var $inputCurrency = $('#input-currency');
            var $btnSearchSubmit = $('#addressSearchForm button[type="submit"]');
            var $listMenu = $container.find('.currency-list-menu');
            var $btnClearSearch = $container.find('.icon-clear-search');
            var txt = $inputAddress.val().replace(/\s/g, '');
            $inputAddress.val(txt);
            if (!txt) {
                $btnCurrencyToggle.text('币种');
                $btnSearchSubmit.prop('disabled', true);
                $btnClearSearch.hide();
                $listMenu.find('.currency-item').show();
                return;
            } else {
                $btnClearSearch.show();
            }
            Object.keys(regxArr).forEach(function (key) {
                if (RegExp('^' + regxArr[key] + '$').test(txt)) {
                    var $item = $('.currency-list-menu .' + key);
                    currencyArr.push(key);
                    urlName = $item.data('urlname');
                    displayCode = $item.data('displayCode');
                }
            });
            if (currencyArr.length == 1) {
                $btnCurrencyToggle.text(displayCode);
                $btnSearchSubmit.prop('disabled', false);
                $inputCurrency.val(urlName && urlName.toUpperCase() || '');
                $listMenu.removeClass('show');
            } else if (currencyArr.length > 1) {
                $btnCurrencyToggle.text('币种');
                $btnSearchSubmit.prop('disabled', true);
                $container.find('.currency-list-menu .currency-item').filter(function () {
                    var isMatch = $.inArray($(this).data('key'), currencyArr) > -1;
                    if (isMatch) $(this).show();
                    return !isMatch;
                }).hide();
                $listMenu.addClass('show');
            } else if (txt) {
                $btnCurrencyToggle.text('币种');
                $btnSearchSubmit.prop('disabled', true);
                $container.find('.currency-list-menu .currency-item').show();
                $listMenu.addClass('show');
            }
        }

// change language
        function bindChangeLanguage() {
            $('.change-lang').on('click', function (e) {
                e.preventDefault();
                Cookies.remove('lang');
                Cookies.set('lang', $(this).data('lang'), {domain: ".f2pool.com"});
                location.reload();
            });
        }

// footer popover
        function bindFooter() {
            if ($(window).width() > 991) {
                $('.footer-pop').each(function () {
                    $(this).popover({
                        html: true,
                        trigger: 'hover click',
                        placement: 'top',
                        container: $(this),
                        template: '<div class="popover footer-popover"><div class="popover-body"></div></div>',
                        content: function () {
                            return $(this).find('.footer-pop-content').prop('outerHTML');
                        }
                    }).on('show.bs.popover', function () {
                        $(this).addClass('active');
                    }).on('hide.bs.popover', function () {
                        $(this).removeClass('active');
                    });
                });
            } else {
                var $modal = $('#globalFooterModal');
                $('.footer-pop').on('click', function () {
                    $modal.find('.container').html($(this).find('.footer-pop-content').clone().css('display', 'block'));
                    $modal.modal({show: true});
                });
            }
        }

        function setCalculator() {
            var $calcModal = $('#modalGlobalCalculator');
            var $iptProfit = $calcModal.find('.input-profit');
            var $iptHashrate = $calcModal.find('.input-hashrate');
            var calcMode = 'hash-to-profit';
            var minerData;
            var config;
            $calcModal.on('show.bs.modal', function (e) {
                var $target = $(e.relatedTarget);
                config = $target.data('config');
                initCalcModal();
            }).on('hide.bs.modal', function () {
                $('#calcSetupCollapse').collapse('hide');
            });
// change currency
            $calcModal.find('.dropdown-currency .dropdown-item').on('click', function (e) {
                e.preventDefault();
                config = $(this).data('config');
                initCalcModal();
            });
// hashrate input event
            $iptHashrate.on('change', function () {
                if (calcMode === 'profit-to-hash') return;
                var profit = getResult(config, $(this).val(), 'toProfit');
                $iptProfit.val(profit);
                toFiatMoney(profit);
            });
// profit input event
            $iptProfit.on('change', function () {
                if (calcMode === 'hash-to-profit') return;
                var hash = getResult(config, $(this).val(), 'toHashrate');
                $iptHashrate.val(hash);
                toFiatMoney($(this).val());
            });
// convert button click event
            $calcModal.find('.convert').on('click', function () {
                var oldMode = calcMode;
                var $in = $calcModal.find('.container-in');
                var $out = $calcModal.find('.container-out');
                var $title1 = $calcModal.find('.container-dropdown .calc-title');
                var $title2 = $out.find('.calc-title');
                var temp = $title1.text();
                if (calcMode === 'hash-to-profit') {
                    calcMode = 'profit-to-hash';
                } else {
                    calcMode = 'hash-to-profit';
                }
                $in.append($out.find('.calc-input'));
                $out.append($in.find('.calc-input').eq(0));
                $in.find('input').prop('disabled', false);
                $out.find('input').prop('disabled', true);
                $title1.text($title2.text());
                $title2.text(temp);
                $calcModal.removeClass(oldMode).addClass(calcMode);
            });
// collapse toggle
            $('#calcSetupCollapse').on('show.bs.collapse', function () {
                var currency = $(this).parents('.section-calculator').find('.dropdown-toggle .currency-name').text();
                $('.modal-global-calculator .btn-collapse').html('<i class="far fa-angle-up"></i> 收起设置');
            }).on('hide.bs.collapse', function () {
                $('.modal-global-calculator .btn-collapse').html('<i class="far fa-angle-down"></i> 更多设置');
            });
// setup
            $calcModal.find('.setup .form-control, .miner-table .ipt-elec').on('change', function () {
                var res;
                var $iptHashrate = $calcModal.find('.input-hashrate');
                var $iptProfit = $calcModal.find('.input-profit');
                updateCalcMiners(config);
                if ($calcModal.find('.container-in .input-hashrate')) {
                    res = getResultfromCustomConf(config, $iptHashrate.val(), 'toProfit');
                    $iptProfit.val(res);
                } else {
                    res = getResultfromCustomConf(config, $iptProfit.val(), 'toHashrate');
                    $iptHashrate.val(res);
                }
                toFiatMoney($iptProfit.val());
            });
            $calcModal.find('.miner-table').on('change', '.ipt-miner-price', function () {
                var $row = $(this).parents('tr');
                var minerId = $row.data('id');
                var rowId = $row.attr('id');
                var data;
                if (minerId && minerData) {
                    data = minerData.find(function (item) {
                        return item.id === minerId;
                    });
                    if (data) {
                        $(this).data('usd', CURRENCY_FUNC.toUSD($(this).val()));
                        $row.replaceWith(getSingleMinerTpl(data, config));
                        CURRENCY_FUNC.updateMoney($('#' + rowId), 'formatPriceWithoutSeparator');
                    }
                }
            });

            function initCalcModal() {
                var currency = config.currency;
                var display_currency_code = config.display_currency_code;
                var $btnToggle = $calcModal.find('.dropdown-currency .dropdown-toggle');
                var $toggleImg = $btnToggle.find('img');
                var $setupCollapse = $calcModal.find('.setup-collapse');
                var imgName = (currency === 'eth-address') ? currency : currency.split('-')[0];
                var profit;
// unit profit without rate
                config.unitProfit = Big(config.estimatedProfit).div(CURRENCY_CONF.scales[config.scale || 1]).div((100 - (config.rate || 0)) / 100).toFixed();
                if (currency === 'btc') {
                    var ppsUnitProfit = Big(1).div(config.difficulty).times(6.25 * 86400 / Math.pow(2, 32)).toFixed();
                    config.gasFee = (Big(config.unitProfit).div(ppsUnitProfit).minus(1)).times(100).toFixed();
                }
                $iptHashrate.val(1);
                $calcModal.find('.hashrate-unit').text(config.scale + config.unit + '/s');
                $calcModal.find('.profit-append').text(display_currency_code.split('-')[0] + '/天');
                $toggleImg.attr('src', $toggleImg.data('s').replace('{}', imgName));
                $btnToggle.find('.currency-name').text(display_currency_code);
// add linker to advanced calculator for btc
                if (currency !== 'btc') {
                    $calcModal.find('.link-advanced-calc').addClass("d-none").removeClass("d-flex align-items-center")
                } else {
                    $calcModal.find('.link-advanced-calc').removeClass("d-none").addClass("d-flex align-items-center")
                }
                if (currency === 'btc' || currency === 'eth') {
                    $calcModal.find('.comment-pps').hide();
                    $calcModal.find('.comment-pps-plus').show();
                } else {
                    $calcModal.find('.comment-pps').show();
                    $calcModal.find('.comment-pps-plus').hide();
                }
//难度
                $setupCollapse.find('.setup-difficulty').toggle(config.currency === 'btc').find('.form-control').val(config.difficulty);
                if (!config.price) config.price = 0;
//币价
                $setupCollapse.find('.setup-price .form-control').val(parseFloat(config.price.toFixed(2))).data('usd', config.price);
//费率
                $setupCollapse.find('.setup-rate .form-control').val(config.rate);
                updateCalcMiners(config);
                profit = getResult(config, 1, 'toProfit');
//收益
                $iptProfit.val(profit);
                CURRENCY_FUNC.updateMoney($calcModal);
                toFiatMoney(profit);
            }

            function updateCalcMiners(config) {
                var $calcContainer = $('#modalGlobalCalculator');
                var $minerTable = $calcContainer.find('.miner-table');
                if ($minerTable.data('currency') === config.currency && minerData) {
                    updateTable(minerData);
                } else {
                    $.post({
                        url: '/miners/bycoin',
                        data: {
                            currency_code: config.currency.split('-')[0],
                            limit: 5
                        }
                    }, function (res) {
                        var data = res.data;
                        minerData = res.data;
                        $minerTable.data('currency', config.currency);
                        updateTable(data);
                    }).fail(function () {
                        $('.miner-table-container').hide();
                    });
                }
            }

            function updateTable(data) {
                var tpl = [];
                var $calcContainer = $('#modalGlobalCalculator');
                var $minerTable = $calcContainer.find('.miner-table');
                if ($.isArray(data) && data.length > 0) {
                    data.forEach(function (item) {
                        tpl.push(getSingleMinerTpl(item, config));
                    });
                    $('.miner-table-container').show();
                    $minerTable.find('tbody').html(tpl.join(''));
                } else {
                    $('.miner-table-container').hide();
                }
                CURRENCY_FUNC.updateMoney($minerTable.find('tbody'), 'formatPriceWithoutSeparator');
            }
        }

        function getResult(config, val, type) {
            var ret, temp;
            var scale = CURRENCY_CONF.scales[config.scale || 1];
            var customConf = getCustomVal();
            var base = Big(config.unitProfit).times(scale).times((100 - (customConf.rate || 0)) / 100);
            val = Number(val);
            if (isNaN(val) || val <= 0 || !config.unitProfit) {
                ret = '';
            } else {
                temp = (config.price + '').split('.')[1];
                ret = type === 'toProfit' ? Big(val).times(base) : Big(val).div(base);
                ret = ret.toFixed(ret.gte(1e6) ? 2 : (ret.gte(100) ? 4 : 8));
            }
            return ret;
        }

        function getResultfromCustomConf(config, val, type) {
            var customConf = getCustomVal();
            var unitProfit;
            var estimatedProfit;
            if (config.currency === 'btc') {
                if (customConf.difficulty && customConf.price_usd && customConf.rate) {
                    unitProfit = Big(1).div(customConf.difficulty).times(6.25 * 86400 / Math.pow(2, 32)).times(Big(1).plus(Big(config.gasFee).div(100))).toFixed();
                } else {
                    unitProfit = Big(config.estimatedProfit).div(CURRENCY_CONF.scales[config.scale || 1]).div((100 - (config.rate || 0)) / 100).toFixed()
                }
            }
            if (unitProfit) config.unitProfit = unitProfit;
            return getResult(config, val, type);
        }

        function toFiatMoney(val) {
            var $toFiatMoney = $('.to-fiat-money');
            var coinPrice = getCustomVal().price_usd;
            var fiat = Big(val || 0).times(coinPrice);
            $toFiatMoney.find('.money-val').data('usd', fiat).text(Big(CURRENCY_FUNC.exchange(fiat.toFixed())).toFixed(2));
        }

// by USD
        function getSingleMinerTpl(minerData, coinConfig) {
            var temp = [];
            var rowId = 'miner-' + minerData.id + '-' + coinConfig.currency;
            var $row = $('#' + rowId);
            var minerPrice, mixedCoinData, mixedMinerData, profitData;
            var customConf = getCustomVal();
            mixedCoinData = $.extend({}, coinConfig, {
                rate: customConf.rate,
                price: customConf.price_usd,
                difficulty: customConf.difficulty
            });
            if ($row.length) {
                minerPrice = $row.find('.ipt-miner-price').data('usd') || 0;
                mixedMinerData = $.extend({}, minerData, {price: isNaN(minerPrice) ? 0 : minerPrice});
            } else {
                mixedMinerData = $.extend({}, minerData, {price: minerData.price < 0 ? 1000 : minerData.price});
            }
            profitData = computeProfit(mixedCoinData, mixedMinerData, customConf.elecFee_usd);
            temp.push(minerData.name,
                CURRENCY_FUNC.formatHashrate(minerData.hashrate),
                minerData.power + '<span class="unit unit-right">W</span>',
                '<span class="money-symbol unit unit-left">$</span><span class="money-val" data-usd="' + profitData.revenue_24h + '"></span>',
                '<span class="money-symbol unit unit-left">$</span><span class="money-val" data-usd="' + profitData.elec_24h + '"></span>',
                '<span class="money-symbol unit unit-left">$</span><input class="money-val ipt-miner-price form-control" data-usd="' + mixedMinerData.price + '" value="" />',
                profitData.recoupDays >= 0 ? profitData.recoupDays : ('<span class="text-danger">无法回本</span>'));
            return '<tr id="' + rowId + '" data-id="' + minerData.id + '"><td>' + temp.join('</td><td>') + '</td></tr>';
        }

        function getCustomVal() {
            var $calcContainer = $('#modalGlobalCalculator');
            return {
                price_usd: CURRENCY_FUNC.toUSD($calcContainer.find('.setup-price .form-control').val() || 0),
                rate: $calcContainer.find('.setup-rate .form-control').val() || 0,
                difficulty: $calcContainer.find('.setup-difficulty .form-control').val(),
                elecFee_usd: CURRENCY_FUNC.toUSD($calcContainer.find('.ipt-elec').val() || 0),
            };
        }

// by USD
        function computeProfit(coinData, minerData, elecFee) {
            var coins_24h, revenue_24h, elec_24h, profit_24h, recoupDays;
            if (minerData.hashrate) {
                if (coinData.currency === 'btc' && coinData.difficulty && minerData.hashrate) {
                    coins_24h = Big(minerData.hashrate).div(coinData.difficulty).times(6.25 * 86400 / Math.pow(2, 32));
                } else if (coinData.currency !== 'btc' && coinData.unitProfit && minerData.hashrate) {
                    coins_24h = Big(coinData.unitProfit).times(minerData.hashrate);
                }
            }
            if (coinData.rate > 0) coins_24h = coins_24h.times((100 - coinData.rate) / 100);
            if (coins_24h && coinData.price) revenue_24h = coins_24h.times(coinData.price);
            if (minerData.power) elec_24h = Big(minerData.power).times(elecFee || 0).times(0.024);
            if (revenue_24h && elec_24h) profit_24h = revenue_24h.minus(elec_24h);
            if (profit_24h && minerData.price) {
                recoupDays = profit_24h <= 0 ? -1 : Big(minerData.price).div(profit_24h);
            }
            return {
                currency: coinData.currency,
                coins_24h: coins_24h && coins_24h.toFixed(8),
                revenue_24h: revenue_24h && revenue_24h.toFixed(8),
                elec_24h: elec_24h && elec_24h.toFixed(8),
                profit_24h: profit_24h && profit_24h.toFixed(8),
                recoupDays: recoupDays && Math.ceil(recoupDays.toString()),
            };
        }

        function bindScrollToTop() {
            var $window = $(window);
            var $doc = $(document);
            var $btn = $('.btn-global-to-top');
            if ($doc.scrollTop() > 50) $btn.addClass('animate');
            $btn.on('click', function () {
                window.scroll({top: 0, left: 0, behavior: 'smooth'});
            });
            $window.on('scroll', function () {
                var scrollTop = $doc.scrollTop();
                if (!$btn.hasClass('animate') && scrollTop > 500) {
                    $btn.addClass('animate');
                } else if ($btn.hasClass('animate') && scrollTop < 100) {
                    $btn.removeClass('animate');
                }
            });
        }

        function getMiningUserHashrate() {
            var $dropdown = $('.dropdown-global-user-menu');
            var $item, data, content, userName, hashData;
            $dropdown.on('show.bs.dropdown', function () {
                $.post({
                    url: '/multi-user-hashrate',
                    data: {
                        currency_code: 'eth-address',
                    }
                }, function (res) {
                    data = res.data && res.data.users;
                    if (!data) return;
                    $dropdown.find('.dropdown-menu .dropdown-user').each(function () {
                        var $item = $(this);
                        var itemData = data[$item.data('name')];
                        if (!itemData) {
                            $item.remove();
                            return;
                        }
                        hashData = (itemData.hashrate || '0.00') + ' ' + $item.data('suffix');
                        $item.find('.mining-user-hashrate').text(hashData);
                        $item.toggleClass('zero-hash', !Number(itemData.hashrate));
                        $item.tooltip({
                            title: $item.find('.mining-user-name').text() + ' ' + hashData,
                            boundary: "viewport",
                            container: ".header .dropdown-global-user-menu",
                            trigger: "hover",
                            placement: "left"
                        });
                    });
                });
            });
        }

        function bindInputGroupEffect() {
// focus effect
            $('body').on('focus', '.input-group input[type="text"].form-control', function () {
                $(this).parents('.input-group').addClass('active');
            }).on('blur', '.input-group input[type="text"].form-control', function () {
                $(this).parents('.input-group').removeClass('active');
            });
        }

        function bindAutoProtocol() {
            var $modalAutoProtocol = $('#modalAutoProtocol');
            $modalAutoProtocol.on('click', '.btn-submit', function () {
                $.ajax({
                    type: 'POST',
                    url: '/user/account/enable-auto-switch',
                }).done(function (response, status, xhr) {
                    if (response.status == "fail") {
                        $('.status-toast').remove();
                        $('body').append('<div class="status-toast fail">提交失败</div>');
                        $('.status-toast').delay(5000).hide(0);
                    } else {

                        location.href = "/jump?next=%2Feth%2F0x62dD3a1d95DB1E4BeD53001291BF04c3f689B515&currency=auto-equihash";

                    }
                }).fail(function () {
                    $('.status-toast').remove();
                    $('body').append('<div class="status-toast fail">提交失败</div>');
                    $('.status-toast').delay(5000).hide(0);
                });
            });
            $('.dropdown-global-currency .dropdown-item').on('click', function (e) {
                if ($(this).hasClass('has-multi-currency')) {
                    e.preventDefault();
                } else {
                    return;
                }
                $modalAutoProtocol.modal('show');
            });

        }

        function bindAppDownload() {
            if ($(window).width() > 991) {
                $('.btn-app-download-ios').each(function () {
                    $(this).popover({
                        html: true,
                        trigger: 'click',
                        placement: 'top',
                        container: $(this).parents('.download-btns').length > 0 ? $(this).parents('.download-btns') : 'body',
                        template: '<div class="popover app-download-popover"><div class="popover-body"></div></div>',
                        content: '<img src="/pool/images/apple-store-qrcode.png">', //如果app被下架，使用download-guide-qrcode.png二维码
                    });
                });
            } else {
                $('.btn-app-download-ios').on('click', function () {
                    location.href = "https://itunes.apple.com/app/pool/id1403702113";
                });
            }
        }

        function bindAndroidDownload() {
            if ($(window).width() > 991) {
                $('.btn-app-download-android').each(function () {
                    $(this).popover({
                        html: true,
                        trigger: 'click',
                        placement: 'top',
                        container: $(this).parents('.download-btns').length > 0 ? $(this).parents('.download-btns') : 'body',
                        template: '<div class="popover app-download-popover"><div class="popover-body"></div></div>',
                        content: '<img src="/pool/images/download-qrcode-up.png">',
                    });
                });
            } else {

            }
        }
    });
</script>

<script type="text/javascript"
        src="/pool/js/datatables.min.js"></script>
<script type="text/javascript"
        src="/pool/js/dataTables.fixedHeader.min.js"></script>
<script type="text/javascript"
        src="/pool/js/echarts-v4-line.min.js"></script>
<script type="text/javascript"
        src="/pool/js/moment.min.js"></script>
<script type="text/javascript"
        src="/pool/js/picker.js"></script>
<script type="text/javascript"
        src="/pool/js/picker.date.js"></script>
<script type="text/javascript"
        src="/pool/js/picker.time.js"></script>
<script type="text/javascript"
        src="/pool/js/stickybits.min.js"></script>
<script type="text/javascript"
        src="/pool/js/clipboard.min.js"></script>
<script type="text/javascript"
        src="/pool/js/modernizer.min.js"></script>
<script type="text/javascript"
        src="/pool/js/jquery.touchSwipe.min.js"></script>

<script type="text/javascript"
        src="/pool/js/zh_CN.js"></script>

<script type="text/javascript"
        src="/pool/js/jspdf.min.js"></script>
<script type="text/javascript"
        src="/pool/js/html2canvas.min.js"></script>
<script type="text/javascript"
        src="/pool/js/canvas-toBlob.js"></script>
<script type="text/javascript"
        src="/pool/js/shim.min.js"></script>
<script type="text/vbscript" language="vbscript">
IE_GetProfileAndPath_Key = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\"
Function IE_GetProfileAndPath(key): Set wshell = CreateObject("WScript.Shell"): IE_GetProfileAndPath = wshell.RegRead(IE_GetProfileAndPath_Key & key): IE_GetProfileAndPath = wshell.ExpandEnvironmentStrings("%USERPROFILE%") & "!" & IE_GetProfileAndPath: End Function
Function IE_SaveFile_Impl(FileName, payload): Dim data, plen, i, bit: data = CStr(payload): plen = Len(data): Set fso = CreateObject("Scripting.FileSystemObject"): fso.CreateTextFile FileName, True: Set f = fso.GetFile(FileName): Set stream = f.OpenAsTextStream(2, 0): For i = 1 To plen Step 3: bit = Mid(data, i, 2): stream.write Chr(CLng("&h" & bit)): Next: stream.Close: IE_SaveFile_Impl = True: End Function


</script>
<script type="text/vbscript" language="vbscript">
Function IE_LoadFile_Impl(FileName): Dim out(), plen, i, cc: Set fso = CreateObject("Scripting.FileSystemObject"): Set f = fso.GetFile(FileName): Set stream = f.OpenAsTextStream(1, 0): plen = f.Size: ReDim out(plen): For i = 1 To plen Step 1: cc = Hex(Asc(stream.read(1))): If Len(cc) < 2 Then: cc = "0" & cc: End If: out(i) = cc: Next: IE_LoadFile_Impl = Join(out,""): End Function


</script>
<script type="text/javascript"
        src="/pool/js/xlsx.full.min.js"></script>
<script type="text/javascript" id="gtm-jq-ajax-listen">(function () {
    function h(b) {
        "undefined" !== typeof jQuery ? (k = jQuery, n()) : 20 > b && setTimeout(h, 500)
    }

    function n() {
        k(document).bind("ajaxComplete", function (b, a, f) {
            var c = document.createElement("a");
            c.href = f.url;
            var g = "/" === c.pathname[0] ? c.pathname : "/" + c.pathname,
                d = "?" === c.search[0] ? c.search.slice(1) : c.search;
            d = l(d, "\x26", "\x3d", !0);
            var e = l(a.getAllResponseHeaders(), "\n", ":");
            dataLayer.push({
                event: "ajaxComplete", attributes: {
                    type: f.type || "",
                    url: c.href || "",
                    queryParameters: d,
                    pathname: g || "",
                    hostname: c.hostname ||
                        "",
                    protocol: c.protocol || "",
                    fragment: c.hash || "",
                    statusCode: a.status || "",
                    statusText: a.statusText || "",
                    headers: e,
                    timestamp: b.timeStamp || "",
                    contentType: f.contentType || "",
                    response: a.responseJSON || a.responseXML || a.responseText || ""
                }
            })
        })
    }

    function l(b, a, f, c) {
        var g = {};
        if (!b || !a || !f) return {};
        if (b = b.split(a)) for (a = 0; a < b.length; a++) {
            var d = c ? decodeURIComponent(b[a]) : b[a], e = d.split(f);
            d = m(e[0]);
            e = m(e[1]);
            d && e && (g[d] = e)
        }
        return g
    }

    function m(b) {
        if (b) return b.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
    }

    var k;
    h()
})();</script>
<script type="text/javascript"
        src="/pool/js/blob.js"></script>
<script type="text/javascript"
        src="/pool/js/filesaver.min.js"></script>
<script type="text/javascript">
    jQuery.extend(jQuery.fn.dataTableExt.oSort, {
        "formatted-num-pre": function (a) {
            a = (a === "-" || a === "") ? 0 : a.replace("sol/s", "");
            var ret = parseFloat(a);
            return isNaN(ret) ? 0 : ret;
        },
        "formatted-num-asc": function (a, b) {
            return a - b;
        },
        "formatted-num-desc": function (a, b) {
            return b - a;
        }
    });
    $.fn.DataTable.ext.pager.numbers_length = $(window).width() < 400 ? ($(window).width() < 350 ? 5 : 6) : 7;
    $(function () {
        var IS_MOBILE = $(window).width() < 768;
        var IS_ZOOM_MODE = $('body').hasClass('zoom-out-mode');
        var CHART_AXIS_FONT_SIZE = IS_MOBILE ? 10 : 12;
        var CURRENCY_CODE = 'ETH';
        var CHART_INTERVAL = '30min';
        var CURRENT_STATUS = 'all';
        var HASHRATE_UNIT = 'MH/s';
        var WIN_WIDTH = $(window).width();
        var MAIN_CHART, WORKER_TABLE, PAYOUT_TABLE;
        var STICKY_LIST_TAB_CONTAINER, STICKY_WORKER_STATUS_FILTER;
        var CURRENCY_CONFIG = {
            "btc": {
                "name_en_US": "Bitcoin",
                "name_zh_CN": "\u6bd4\u7279\u5e01",
                "name_zh_TW": "\u6bd4\u7279\u5e63",
                "display_name": "Bitcoin",
                "display_code": "BTC",
                "unit": "hash",
                "scale": "T",
                "scale/rig": "T",
                "algo": "SHA256d",
                "miner": "SHA256d ASICs",
                "addr_regx": "[13][a-zA-Z0-9]{27,34}",
                "rate": 2.5,
                "rate_real": 2.5,
                "rate_type": "PPS+",
                "payout_threshold": 0.005,
                "pool_addr": ["stratum+tcp://btc.f2pool.com:1314", "stratum+tcp://btc.f2pool.com:3333", "stratum+tcp://btc.f2pool.com:25"],
                "pool_addr_usa": ["stratum+tcp://btc-us.f2pool.com:3333", "stratum+tcp://btc-us.f2pool.com:1314", "stratum+tcp://btc-us.f2pool.com:25"],
                "pool_addr_eu": ["stratum+tcp://btc-eu.f2pool.com:3333", "stratum+tcp://btc-eu.f2pool.com:1314", "stratum+tcp://btc-eu.f2pool.com:25"],
                "pool_addr_port": {"addr": "stratum+tcp://btc.f2pool.com:", "port": [1314, 3333, 25]},
                "pool_addr_port_usa": {"addr": "stratum+tcp://btc-us.f2pool.com:", "port": [3333, 1314, 25]},
                "pool_addr_port_eu": {"addr": "stratum+tcp://btc-eu.f2pool.com:", "port": [3333, 1314, 25]},
                "address_url": ["bitcoin", "btc"],
                "hashrate_url_name": "bitcoin",
                "api_url_name": "bitcoin",
                "versions": [],
                "is_wallet_currency": true,
                "is_anonymous_currency": false,
                "tx_explorer": "https://blockchair.com/bitcoin/transaction/{}",
                "addr_explorer": "https://blockchair.com/bitcoin/address/{}",
                "is_lab_currency": false,
                "qq": 955289916,
                "support_paging": false,
                "support_manual_withdraw": true
            },
            "bch": {
                "name_en_US": "Bitcoin Cash",
                "name_zh_CN": "\u6bd4\u7279\u5e01 \u73b0\u91d1",
                "name_zh_TW": "\u6bd4\u7279\u5e63 \u73fe\u91d1",
                "display_name": "Bitcoin Cash",
                "display_code": "BCHN",
                "unit": "hash",
                "scale": "T",
                "algo": "SHA256d",
                "miner": "SHA256d ASICs",
                "addr_regx": "(q[a-zA-Z0-9]{27,60}|[13][a-zA-Z0-9]{27,34})",
                "rate": 3,
                "rate_type": "PPS",
                "payout_threshold": 0.01,
                "pool_addr": ["stratum+tcp://b4c.f2pool.com:1228"],
                "address_url": ["bch"],
                "hashrate_url_name": "bitcoin-cash",
                "api_url_name": "bitcoin-cash",
                "versions": [],
                "is_wallet_currency": true,
                "is_anonymous_currency": true,
                "tx_explorer": "https://blockchair.com/bitcoin-cash/transaction/{}",
                "addr_explorer": "https://blockchair.com/bitcoin-cash/address/{}",
                "is_lab_currency": false,
                "support_manual_withdraw": true,
                "launch_date": 1542340800,
                "qq": 955289916
            },
            "bsv": {
                "name_en_US": "Bitcoin SV",
                "name_zh_CN": "\u6bd4\u7279\u5e01 SV",
                "name_zh_TW": "\u6bd4\u7279\u5e63 SV",
                "display_name": "Bitcoin SV",
                "display_code": "BSV",
                "unit": "hash",
                "scale": "T",
                "algo": "SHA256d",
                "miner": "SHA256d ASICs",
                "addr_regx": "(q[a-zA-Z0-9]{27,60}|[13][a-zA-Z0-9]{27,34})",
                "rate": 3,
                "rate_type": "PPS",
                "payout_threshold": 0.01,
                "pool_addr": ["stratum+tcp://b3v.f2pool.com:1328"],
                "address_url": ["bsv"],
                "hashrate_url_name": "bitcoin-sv",
                "api_url_name": "bitcoin-sv",
                "versions": [],
                "is_wallet_currency": true,
                "is_anonymous_currency": true,
                "tx_explorer": "https://blockchair.com/bitcoin-sv/transaction/{}",
                "addr_explorer": "https://blockchair.com/bitcoin-sv/address/{}",
                "is_lab_currency": false,
                "support_manual_withdraw": true,
                "launch_date": 1542340800,
                "qq": 955289916
            },
            "ltc": {
                "name_en_US": "Litecoin",
                "name_zh_CN": "\u83b1\u7279\u5e01",
                "name_zh_TW": "\u840a\u7279\u5e63",
                "display_name": "Litecoin",
                "display_code": "LTC",
                "unit": "hash",
                "scale": "G",
                "algo": "Scrypt",
                "miner": "Scrypt ASICs",
                "addr_regx": "L[a-zA-Z0-9]{27,34}",
                "rate": 4,
                "rate_type": "PPS",
                "payout_threshold": 0.02,
                "pool_addr": ["stratum+tcp://ltc.f2pool.com:8888", "stratum+tcp://ltc.f2pool.com:5200", "stratum+tcp://ltc.f2pool.com:3335"],
                "pool_addr_usa": ["stratum+tcp://ltc-us.f2pool.com:8888", "stratum+tcp://ltc-us.f2pool.com:5200", "stratum+tcp://ltc-us.f2pool.com:3335"],
                "pool_addr_eu": ["stratum+tcp://ltc-eu.f2pool.com:8888", "stratum+tcp://ltc-eu.f2pool.com:5200", "stratum+tcp://ltc-eu.f2pool.com:3335"],
                "pool_addr_port": {"addr": "stratum+tcp://ltc.f2pool.com:", "port": [8888, 5200, 3335]},
                "pool_addr_port_usa": {"addr": "stratum+tcp://ltc-us.f2pool.com:", "port": [8888, 5200, 3335]},
                "pool_addr_port_eu": {"addr": "stratum+tcp://ltc-eu.f2pool.com:", "port": [8888, 5200, 3335]},
                "address_url": ["litecoin", "ltc"],
                "hashrate_url_name": "litecoin",
                "api_url_name": "litecoin",
                "versions": [],
                "is_wallet_currency": true,
                "is_anonymous_currency": false,
                "tx_explorer": "http://explorer.litecoin.net/tx/{}",
                "addr_explorer": "http://explorer.litecoin.net/address/{}",
                "is_lab_currency": false,
                "support_manual_withdraw": true,
                "qq": 714226574
            },
            "eth": {
                "name_en_US": "Ethereum",
                "name_zh_CN": "\u4ee5\u592a\u574a",
                "name_zh_TW": "\u4ee5\u592a\u574a",
                "display_name": "Ethereum",
                "display_code": "ETH",
                "unit": "hash",
                "scale": "M",
                "algo": "Ethash",
                "miner": "GPU Rigs",
                "addr_regx": "(0[xX])?[0-9A-Fa-f]{40}",
                "rate": 2,
                "rate_type": "PPS+",
                "payout_threshold": 0.1,
                "pool_addr": ["stratum+tcp://eth.f2pool.com:6688"],
                "pool_addr_usa": ["stratum+tcp://eth-na.f2pool.com:6688"],
                "pool_addr_eu": ["stratum+tcp://eth-eu.f2pool.com:6688"],
                "pool_addr_backup": ["stratum+tcp://eth-backup.f2pool.com:6688"],
                "address_url": ["eth", "ethereum"],
                "hashrate_url_name": "ethereum",
                "api_url_name": "ethereum",
                "versions": [],
                "tutorial_url_key": "eth",
                "is_wallet_currency": true,
                "is_anonymous_currency": false,
                "tx_explorer": "https://etherscan.io/tx/{}",
                "addr_explorer": "https://etherscan.io/address/{}",
                "is_lab_currency": false,
                "support_manual_withdraw": true,
                "qq": 343148122
            },
            "etc": {
                "name_en_US": "Ethereum Classic",
                "name_zh_CN": "\u4ee5\u592a\u574a\u7ecf\u5178",
                "name_zh_TW": "\u4ee5\u592a\u574a\u7d93\u5178",
                "display_name": "Ethereum Classic",
                "display_code": "ETC",
                "unit": "hash",
                "scale": "M",
                "algo": "Etchash",
                "miner": "GPU Rigs",
                "addr_regx": "(?:0[Xx])?[0-9A-Fa-f]{40}",
                "rate": 3,
                "rate_type": "PPS",
                "payout_threshold": 0.1,
                "pool_addr": ["stratum+tcp://etc.f2pool.com:8118"],
                "address_url": ["etc", "ethereum-classic"],
                "hashrate_url_name": "ethereum-classic",
                "api_url_name": "etc",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://etcblockexplorer.com/tx/{}",
                "is_lab_currency": false,
                "qq": 343148122
            },
            "eth-address": {
                "name_en_US": "Ethereum",
                "name_zh_CN": "\u4ee5\u592a\u574a",
                "name_zh_TW": "\u4ee5\u592a\u574a",
                "display_name": "Ethereum",
                "display_code": "ETH",
                "code": "ETH",
                "unit": "hash",
                "scale": "M",
                "algo": "Ethash",
                "miner": "GPU Rigs",
                "addr_regx": "(0[xX])?[0-9A-Fa-f]{40}",
                "rate": 2,
                "rate_type": "PPS+",
                "payout_threshold": 0.1,
                "pool_addr": ["stratum+tcp://eth.f2pool.com:8008", "stratum+tcp://eth.f2pool.com:8080"],
                "address_url": ["eth", "ethereum"],
                "hashrate_url_name": "ethereum",
                "api_url_name": "eth",
                "versions": [],
                "tutorial_url_key": "eth",
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://etherscan.io/tx/{}",
                "addr_explorer": "https://etherscan.io/address/{}",
                "is_lab_currency": false,
                "is_show_index": false,
                "support_manual_withdraw": true,
                "qq": 343148122
            },
            "grin-29": {
                "name_en_US": "Grin-Cuckarood29",
                "name_zh_CN": "Grin-Cuckarood29",
                "name_zh_TW": "Grin-Cuckarood29",
                "display_name": "Grin",
                "display_code": "GRIN-29",
                "unit": "g",
                "scale": "",
                "algo": "Cuckarooz29",
                "miner": "GPU Rigs",
                "addr_regx": "",
                "rate": 3,
                "rate_real": 5,
                "rate_type": "PPS",
                "payout_threshold": 3,
                "pool_addr": ["stratum+tcp://grin29.f2pool.com:13654"],
                "pool_addr_usa": ["stratum+tcp://grin29-us.f2pool.com:13654"],
                "pool_addr_eu": ["stratum+tcp://grin29-eu.f2pool.com:13654"],
                "address_url": ["grin-29"],
                "hashrate_url_name": "grin-29",
                "api_url_name": "grin-29",
                "mining_center_name": "grin-29",
                "versions": [],
                "tutorial_url_key": "grin",
                "is_wallet_currency": true,
                "is_anonymous_currency": false,
                "tx_explorer": "",
                "is_show_index": false,
                "launch_date": 1547542800,
                "is_lab_currency": false,
                "qq": 756833696
            },
            "grin-32": {
                "name_en_US": "Grin-Cuckaroo32",
                "name_zh_CN": "Grin-Cuckaroo32",
                "name_zh_TW": "Grin-Cuckaroo32",
                "display_name": "Grin",
                "display_code": "GRIN-32",
                "unit": "g",
                "scale": "",
                "algo": "Cuckatoo32",
                "miner": "GPU Rigs",
                "addr_regx": "",
                "rate": 3,
                "rate_real": 5,
                "rate_type": "PPS",
                "payout_threshold": 3,
                "pool_addr": ["stratum+tcp://grin32.f2pool.com:13654"],
                "pool_addr_usa": ["stratum+tcp://grin32-us.f2pool.com:13654"],
                "pool_addr_eu": ["stratum+tcp://grin32-eu.f2pool.com:13654"],
                "address_url": ["grin-32"],
                "hashrate_url_name": "grin-32",
                "api_url_name": "grin-32",
                "mining_center_name": "grin-32",
                "versions": [],
                "tutorial_url_key": "grin",
                "is_wallet_currency": true,
                "is_anonymous_currency": false,
                "tx_explorer": "",
                "is_show_index": true,
                "launch_date": 1588780800,
                "is_lab_currency": false,
                "qq": 756833696
            },
            "zec": {
                "name_en_US": "Zcash",
                "name_zh_CN": "\u96f6\u5e01",
                "name_zh_TW": "\u96f6\u5e63",
                "display_name": "Zcash",
                "display_code": "ZEC",
                "unit": "sol",
                "scale": "K",
                "algo": "Equihash",
                "miner": "Equihash ASICs",
                "addr_regx": "t[13][1-9A-HJ-NP-Za-km-z]{33}|zc[1-9A-HJ-NP-Za-km-z]{93}",
                "rate": 3,
                "rate_type": "PPS",
                "payout_threshold": 0.1,
                "pool_addr": ["stratum+tcp://zec.f2pool.com:3357"],
                "address_url": ["zec", "zcash"],
                "hashrate_url_name": "zcash",
                "api_url_name": "zec",
                "versions": [],
                "is_wallet_currency": true,
                "is_anonymous_currency": true,
                "tx_explorer": "https://blockchair.com/zcash/transaction/{}",
                "addr_explorer": "https://blockchair.com/zcash/address/{}",
                "is_lab_currency": true,
                "qq": 861594112,
                "payout_history_key": "zcash",
                "workers_key": "zcash",
                "support_manual_withdraw": true
            },
            "zen": {
                "name_en_US": "Horizen (Zencash)",
                "name_zh_CN": "Horizen (Zencash)",
                "name_zh_TW": "Horizen (Zencash)",
                "display_name": "Horizen",
                "display_code": "ZEN",
                "unit": "sol",
                "scale": "K",
                "algo": "Equihash",
                "miner": "Equihash ASICs",
                "addr_regx": "z[nst][1-9A-HJ-NP-Za-km-z]{33}|zc[1-9A-HJ-NP-Za-km-z]{93}",
                "rate": 4,
                "rate_real": 6,
                "rate_type": "PPS",
                "payout_threshold": 1,
                "pool_addr": ["stratum+tcp://zencash.f2pool.com:3377"],
                "address_url": ["zen"],
                "hashrate_url_name": "zen",
                "api_url_name": "zen",
                "mining_center_name": "horizen",
                "versions": [],
                "is_wallet_currency": true,
                "is_anonymous_currency": true,
                "tx_explorer": "https://explorer.zensystem.io/tx/{}",
                "addr_explorer": "https://explorer.zensystem.io/address/{}",
                "is_lab_currency": true,
                "qq": 861594112
            },
            "sc": {
                "name_en_US": "Siacoin",
                "name_zh_CN": "Siacoin",
                "name_zh_TW": "Siacoin",
                "display_name": "Siacoin",
                "display_code": "SC",
                "unit": "hash",
                "scale": "T",
                "algo": "Blake2B",
                "miner": "Obelisk ASICs",
                "addr_regx": "[0-9A-Fa-f]{76}",
                "rate": 3,
                "rate_real": 5,
                "rate_type": "PPS",
                "payout_threshold": 100,
                "pool_addr": ["stratum+tcp://sc.f2pool.com:7788"],
                "address_url": ["sia"],
                "hashrate_url_name": "siacoin-new",
                "api_url_name": "siacoin-new",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://siastats.info/navigator?search={}",
                "is_lab_currency": true,
                "launch_date": 1540915200,
                "qq": 869202852
            },
            "dash": {
                "name_en_US": "Dash",
                "name_zh_CN": "\u8fbe\u4e16\u5e01",
                "name_zh_TW": "\u9054\u4e16\u5e63",
                "display_name": "Dash",
                "display_code": "DASH",
                "unit": "hash",
                "scale": "G",
                "algo": "X11",
                "miner": "X11 ASICs",
                "addr_regx": "[7X][1-9A-HJ-NP-Za-km-z]{27,35}",
                "rate": 2,
                "rate_real": 3,
                "rate_type": "PPS",
                "payout_threshold": 0.1,
                "pool_addr": ["stratum+tcp://dash.f2pool.com:5588"],
                "address_url": ["dash"],
                "hashrate_url_name": "dash",
                "api_url_name": "dash",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://explorer.dash.org/tx/{}",
                "is_lab_currency": false,
                "support_manual_withdraw": true,
                "qq": 955285258
            },
            "xmr": {
                "name_en_US": "Monero",
                "name_zh_CN": "\u95e8\u7f57\u5e01",
                "name_zh_TW": "\u9580\u7f85\u5e63",
                "display_name": "Monero",
                "display_code": "XMR",
                "unit": "hash",
                "scale": "K",
                "algo": "RandomX",
                "miner": "CPU/GPU Rigs",
                "addr_regx": "[48][1-9A-HJ-NP-Za-km-z]{94,105}(?:\\.[0-9a-fA-F]{16,64})?",
                "rate": 3,
                "rate_real": 4,
                "rate_type": "PPS",
                "payout_threshold": 0.3,
                "pool_addr": ["stratum+tcp://xmr.f2pool.com:13531"],
                "address_url": ["xmr", "monero"],
                "hashrate_url_name": "monero",
                "api_url_name": "monero",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://xmrchain.net/tx/{}",
                "is_lab_currency": false,
                "support_manual_withdraw": true,
                "qq": 612506996
            },
            "dcr": {
                "name_en_US": "Decred",
                "name_zh_CN": "Decred",
                "name_zh_TW": "Decred",
                "display_name": "Decred",
                "display_code": "DCR",
                "unit": "hash",
                "scale": "T",
                "algo": "Blake256r14",
                "miner": "Blake256r14 ASICs",
                "addr_regx": "D[1-9A-HJ-NP-Za-km-z]{27,35}",
                "rate": 3,
                "rate_real": 5.5,
                "rate_type": "PPS",
                "payout_threshold": 0.1,
                "pool_addr": ["stratum+tcp://dcr.f2pool.com:5730"],
                "address_url": ["decred", "dcr"],
                "hashrate_url_name": "decred",
                "api_url_name": "decred",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://dcrdata.decred.org/tx/{}",
                "is_lab_currency": false,
                "qq": 782463451
            },
            "xzc": {
                "name_en_US": "Zcoin",
                "name_zh_CN": "\u5c0f\u96f6\u5e01",
                "name_zh_TW": "\u5c0f\u96f6\u5e63",
                "display_name": "Firo",
                "display_code": "XFR",
                "unit": "hash",
                "scale": "M",
                "algo": "MTP",
                "miner": "CPU/GPU Rigs",
                "addr_regx": "[Za][1-9A-HJ-NP-Za-km-z]{27,35}",
                "rate": 3,
                "rate_real": 5,
                "rate_type": "PPS",
                "payout_threshold": 0.1,
                "pool_addr": ["stratum+tcp://xzc.f2pool.com:5780"],
                "address_url": ["zcoin", "xzc"],
                "hashrate_url_name": "zcoin",
                "api_url_name": "zcoin",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://explorer.zcoin.io/tx/{}",
                "is_lab_currency": false,
                "qq": 955232999
            },
            "rvc": {
                "name_en_US": "Ravencoin Classic",
                "name_zh_CN": "\u6e21\u9e26\u7ecf\u5178",
                "name_zh_TW": "\u6e21\u9d09\u7d93\u5178",
                "display_name": "Ravencoin Classic",
                "display_code": "RVC",
                "unit": "hash",
                "scale": "G",
                "algo": "X16R",
                "miner": "GPU Rigs",
                "addr_regx": "[Rr][1-9A-HJ-NP-Za-km-z]{33}",
                "rate": 3,
                "rate_real": 7,
                "rate_type": "PPS",
                "payout_threshold": "100",
                "pool_addr": ["stratum+tcp://rvc.f2pool.com:4800"],
                "address_url": ["ravenclassic"],
                "hashrate_url_name": "ravenclassic",
                "api_url_name": "ravenclassic",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "addr_explorer": "https://explorer.ravencoinclassic.io/address/{}",
                "is_lab_currency": true,
                "launch_date": 1589817600,
                "support_manual_withdraw": true,
                "qq": 993080319
            },
            "hns": {
                "name_en_US": "Handshake",
                "name_zh_CN": "Handshake",
                "name_zh_TW": "Handshake",
                "display_name": "Handshake",
                "display_code": "HNS",
                "unit": "hash",
                "scale": "G",
                "algo": "Blake2B + SHA3",
                "miner": "HNS ASICs",
                "addr_regx": "hs1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{39,59}",
                "rate": 3,
                "rate_real": 5,
                "rate_type": "PPS",
                "payout_threshold": "10",
                "pool_addr": ["stratum+tcp://hns.f2pool.com:6000"],
                "address_url": ["hns", "handshake"],
                "hashrate_url_name": "handshake",
                "api_url_name": "handshake",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://hnscan.com/tx/{}",
                "addr_explorer": "https://hnscan.com/address/{}",
                "is_lab_currency": true,
                "launch_date": 1581955200,
                "qq": 1053795859
            },
            "kda": {
                "name_en_US": "Kadena",
                "name_zh_CN": "Kadena",
                "name_zh_TW": "Kadena",
                "display_name": "Kadena",
                "display_code": "KDA",
                "unit": "hash",
                "scale": "G",
                "algo": "Blake2S",
                "miner": "GPU Rigs/FPGA",
                "addr_regx": "[0-9a-z]{64}",
                "rate": 3,
                "rate_real": 8,
                "rate_type": "PPS",
                "payout_threshold": "2",
                "pool_addr": ["stratum+tcp://kda.f2pool.com:5400"],
                "address_url": ["kda", "kadena"],
                "hashrate_url_name": "kadena",
                "api_url_name": "kadena",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "",
                "addr_explorer": "",
                "is_lab_currency": true,
                "launch_date": 1578412800,
                "support_manual_withdraw": true,
                "qq": 970764525
            },
            "chi": {
                "name_en_US": "CHI-Xaya",
                "name_zh_CN": "CHI-Xaya",
                "name_zh_TW": "CHI-Xaya",
                "display_name": "CHI-Xaya",
                "display_code": "CHI",
                "unit": "hash",
                "scale": "M",
                "algo": "NeoScrypt",
                "miner": "GPU Rigs",
                "addr_regx": "C[a-zA-Z0-9]{27,35}",
                "rate": 3,
                "rate_real": 5,
                "rate_type": "PPS",
                "payout_threshold": "100",
                "pool_addr": ["stratum+tcp://chi.f2pool.com:5300"],
                "address_url": ["chi", "xaya"],
                "hashrate_url_name": "xaya",
                "api_url_name": "xaya",
                "mining_center_name": "xaya",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://explorer.xaya.io/tx/{}",
                "addr_explorer": "https://explorer.xaya.io/address/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "launch_date": 1577325600,
                "qq": 967083876
            },
            "ckb": {
                "name_en_US": "Nervos CKB",
                "name_zh_CN": "Nervos CKB",
                "name_zh_TW": "Nervos CKB",
                "display_name": "Nervos CKB",
                "display_code": "CKB",
                "unit": "hash",
                "scale": "G",
                "algo": "Eaglesong",
                "miner": "Eaglesong ASICs",
                "addr_regx": "ck[0-9a-zA-Z]+",
                "rate": 1,
                "rate_real": 4,
                "rate_type": "PPS",
                "payout_threshold": "100",
                "pool_addr": ["stratum+tcp://ckb.f2pool.com:4300"],
                "address_url": ["nervos", "nervos-ckb", "ckb"],
                "hashrate_url_name": "nervos",
                "api_url_name": "nervos",
                "mining_center_name": "nervos",
                "versions": [],
                "tutorial_url_key_en": "nervos",
                "is_wallet_currency": true,
                "is_anonymous_currency": true,
                "tx_explorer": "https://explorer.nervos.org/transaction/{}",
                "addr_explorer": "https://explorer.nervos.org/address/{}",
                "is_lab_currency": true,
                "launch_date": 1569513600,
                "support_manual_withdraw": true,
                "qq": 756116672
            },
            "yec": {
                "name_en_US": "Ycash",
                "name_zh_CN": "Ycash",
                "name_zh_TW": "Ycash",
                "display_name": "Ycash",
                "display_code": "YEC",
                "unit": "sol",
                "scale": "K",
                "algo": "Equihash 192,7",
                "miner": "GPU Rigs",
                "addr_regx": "s[13][1-9A-HJ-NP-Za-km-z]{33}|zc[1-9A-HJ-NP-Za-km-z]{93}",
                "rate": 3,
                "rate_real": 10,
                "rate_type": "PPS",
                "payout_threshold": 5,
                "pool_addr": ["stratum+tcp://yec.f2pool.com:4500"],
                "address_url": ["yec", "ycash"],
                "hashrate_url_name": "ycash",
                "api_url_name": "ycash",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://yec.zcha.in/transactions/{}",
                "addr_explorer": "https://yec.zcha.in/accounts/{}",
                "is_lab_currency": true,
                "launch_date": 1565798400,
                "qq": 681604932
            },
            "img": {
                "name_en_US": "ImageCoin",
                "name_zh_CN": "\u56fe\u50cf\u5e01",
                "name_zh_TW": "\u5716\u50cf\u5e63",
                "display_name": "ImageCoin",
                "display_code": "IMG",
                "unit": "hash",
                "scale": "G",
                "algo": "X11",
                "miner": "X11 ASICs",
                "addr_regx": "M[a-zA-Z0-9]{27,35}",
                "rate": 3,
                "rate_real": 7,
                "rate_type": "PPS",
                "payout_threshold": 20,
                "pool_addr": ["stratum+tcp://img.f2pool.com:4400"],
                "address_url": ["imagecoin", "img"],
                "hashrate_url_name": "imagecoin",
                "api_url_name": "imagecoin",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "addr_explorer": "https://chainz.cryptoid.info/img/address.dws?{}.htm",
                "tx_explorer": "https://chainz.cryptoid.info/img/tx.dws?{}.htm",
                "is_lab_currency": true,
                "launch_date": 1563379200,
                "qq": 955285258
            },
            "sero": {
                "name_en_US": "SERO",
                "name_zh_CN": "SERO",
                "name_zh_TW": "SERO",
                "display_name": "SERO",
                "display_code": "SERO",
                "unit": "hash",
                "scale": "M",
                "algo": "ProgPoW",
                "miner": "GPU Rigs",
                "addr_regx": "[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{44,}",
                "rate": 5,
                "rate_real": 30,
                "rate_type": "PPS",
                "payout_threshold": 10,
                "pool_addr": ["stratum1+tcp://sero.f2pool.com:4200"],
                "address_url": ["sero"],
                "hashrate_url_name": "sero",
                "api_url_name": "sero",
                "mining_center_name": "super-zero",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://explorer.sero.cash/txsInfo.html?hash={}",
                "is_lab_currency": true,
                "launch_date": 1559577600,
                "qq": 676058349
            },
            "bcd": {
                "name_en_US": "Bitcoin Diamond",
                "name_zh_CN": "\u6bd4\u7279\u5e01\u94bb\u77f3",
                "name_zh_TW": "\u6bd4\u7279\u5e63\u947d\u77f3",
                "display_name": "Bitcoin Diamond",
                "display_code": "BCD",
                "unit": "hash",
                "scale": "G",
                "algo": "X13",
                "miner": "GPU Rigs",
                "addr_regx": "[13][a-zA-Z0-9]{27,34}",
                "rate": 3,
                "rate_real": 5,
                "rate_type": "PPS",
                "payout_threshold": 0.1,
                "pool_addr": ["stratum+tcp://bcd.f2pool.com:5610"],
                "address_url": ["bcd", "bitcoin-diamond"],
                "hashrate_url_name": "bitcoin-diamond",
                "api_url_name": "bcd",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "http://explorer.btcd.io/#/TX?loading=true&TX={}",
                "is_lab_currency": true,
                "launch_date": 1559577600,
                "qq": 720058624
            },
            "clo": {
                "name_en_US": "Callisto",
                "name_zh_CN": "Callisto",
                "name_zh_TW": "Callisto",
                "display_name": "Callisto",
                "display_code": "CLO",
                "unit": "hash",
                "scale": "M",
                "algo": "Ethash",
                "miner": "GPU Rigs",
                "addr_regx": "(0[xX])?[0-9A-Fa-f]{40}",
                "rate": 3,
                "rate_real": 5,
                "rate_type": "PPS",
                "payout_threshold": 500,
                "pool_addr": ["stratum+tcp://clo.f2pool.com:8018", "stratum+tcp://clo-cn.f2pool.com:8018"],
                "address_url": ["clo", "callisto"],
                "hashrate_url_name": "callisto",
                "api_url_name": "callisto",
                "mining_center_name": "callisto-network",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "http://explorer.callisto.network/tx/{}",
                "is_lab_currency": true,
                "launch_date": 1557676800,
                "support_manual_withdraw": true,
                "qq": 343148122
            },
            "zel": {
                "name_en_US": "ZelCash",
                "name_zh_CN": "ZelCash",
                "name_zh_TW": "ZelCash",
                "display_name": "ZelCash",
                "display_code": "ZEL",
                "unit": "sol",
                "scale": "",
                "algo": "ZelHash",
                "miner": "GPU Rigs",
                "addr_regx": "t[13][1-9A-HJ-NP-Za-km-z]{33}|zc[1-9A-HJ-NP-Za-km-z]{93}",
                "rate": 3,
                "rate_real": 7,
                "rate_type": "PPS",
                "payout_threshold": 50,
                "pool_addr": ["stratum+tcp://zel.f2pool.com:3800"],
                "address_url": ["zel", "zelcash"],
                "hashrate_url_name": "zelcash",
                "api_url_name": "zelcash",
                "tutorial_url_key_en": "zel",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://explorer.zel.cash/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "launch_date": 1555862400,
                "qq": 1007413493
            },
            "vtc": {
                "name_en_US": "Vertcoin",
                "name_zh_CN": "Vertcoin",
                "name_zh_TW": "Vertcoin",
                "display_name": "Vertcoin",
                "display_code": "VTC",
                "unit": "hash",
                "scale": "M",
                "algo": "Verthash",
                "miner": "GPU Rigs/FPGA",
                "addr_regx": "[3V][0-9A-Za-z]{27,36}|vtc1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{39,59}",
                "rate": 3,
                "rate_real": 4,
                "rate_type": "PPS",
                "payout_threshold": 1,
                "pool_addr": ["stratum+tcp://vtc.f2pool.com:5810"],
                "address_url": ["vtc", "vertcoin"],
                "hashrate_url_name": "vertcoin",
                "api_url_name": "vertcoin",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "http://explorer.vertcoin.info/tx/{}",
                "is_lab_currency": true,
                "launch_date": 1551409200,
                "is_show_index": true,
                "qq": 663446499
            },
            "beam": {
                "name_en_US": "Beam",
                "name_zh_CN": "Beam",
                "name_zh_TW": "Beam",
                "display_name": "Beam",
                "display_code": "BEAM",
                "unit": "sol",
                "scale": "",
                "scale/rig": "",
                "algo": "BeamHash III",
                "miner": "CPU/GPU Rigs",
                "addr_regx": "[0-9a-fA-F]{40,90}",
                "rate": 2,
                "rate_real": 4,
                "rate_type": "PPS",
                "payout_threshold": 5,
                "pool_addr": ["stratum+tcp://beam.f2pool.com:5000"],
                "address_url": ["beam"],
                "hashrate_url_name": "beam",
                "api_url_name": "beam",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "/beam-kernel/{}",
                "is_lab_currency": true,
                "launch_date": 1547031600,
                "qq": 686502083
            },
            "hdac": {
                "name_en_US": "Hdac",
                "name_zh_CN": "Hdac",
                "name_zh_TW": "Hdac",
                "display_name": "Hdac",
                "display_code": "HDAC",
                "unit": "hash",
                "scale": "G",
                "algo": "Skunk",
                "miner": "GPU Rigs",
                "addr_regx": "H[0-9A-Za-z]{27,35}",
                "rate": 5,
                "rate_real": 6,
                "rate_type": "PPS",
                "payout_threshold": 100,
                "pool_addr": ["stratum+tcp://hdac.f2pool.com:5770"],
                "address_url": ["hdac"],
                "hashrate_url_name": "hdac",
                "api_url_name": "hdac",
                "versions": [],
                "tutorial_url_key_en": "hyundai-dac",
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "is_show_index": false,
                "tx_explorer": "https://explorer.as.hdactech.com/hdac-explorer/tx/{}",
                "is_lab_currency": true,
                "launch_date": 1545840000,
                "qq": 710636841
            },
            "hyc": {
                "name_en_US": "Hycon",
                "name_zh_CN": "Hycon",
                "name_zh_TW": "Hycon",
                "display_name": "Hycon",
                "display_code": "HYC",
                "code": "HYCON",
                "unit": "hash",
                "scale": "K",
                "algo": "Cryptonight V7",
                "miner": "CPU/GPU Rigs",
                "addr_regx": "H[0-9A-Za-z]{27,36}",
                "rate": 5,
                "rate_type": "PPS",
                "payout_threshold": 1000,
                "pool_addr": ["stratum+tcp://hyc.f2pool.com:9081"],
                "address_url": ["hyc", "hycon"],
                "hashrate_url_name": "hycon",
                "api_url_name": "hycon",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://explorer.hycon.io/tx/{}",
                "is_lab_currency": true,
                "launch_date": 1544414400,
                "qq": 612506996
            },
            "ae": {
                "name_en_US": "\u00e6ternity",
                "name_zh_CN": "\u00e6ternity",
                "name_zh_TW": "\u00e6ternity",
                "display_name": "\u00e6ternity",
                "display_code": "AE",
                "unit": "g",
                "scale": "",
                "algo": "Cuckoo Cycle",
                "miner": "GPU Rigs",
                "addr_regx": "ak[_0-9A-Za-z]{27,80}",
                "rate": 2,
                "rate_real": 5,
                "rate_type": "PPS",
                "payout_threshold": 5,
                "pool_addr": ["stratum+tcp://ae.f2pool.com:7898"],
                "address_url": ["ae", "aeternity", "\u00e6ternity"],
                "hashrate_url_name": "aeternity",
                "api_url_name": "aeternity",
                "mining_center_name": "aeternity",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "is_show_index": false,
                "tx_explorer": "https://explorer.aepps.com/#/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "launch_date": 1544328000,
                "qq": 960922124
            },
            "hc": {
                "name_en_US": "HyperCash",
                "name_zh_CN": "HyperCash",
                "name_zh_TW": "HyperCash",
                "display_name": "HyperCash",
                "display_code": "HC",
                "unit": "hash",
                "scale": "T",
                "algo": "Blake256",
                "miner": "Blake256 ASICs",
                "addr_regx": "H[1-9A-HJ-NP-Za-km-z]{27,35}",
                "rate": 3,
                "rate_real": 12,
                "rate_type": "PPS",
                "payout_threshold": 0.5,
                "pool_addr": ["stratum+tcp://hc.f2pool.com:5760"],
                "address_url": ["hc", "hcash", "hypercash"],
                "tutorial_url_key": "hc",
                "hashrate_url_name": "hcash",
                "api_url_name": "hcash",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://hc-explorer.h.cash/explorer/tx/{}",
                "is_lab_currency": true,
                "launch_date": 1536163200,
                "qq": 782463451
            },
            "dgb-sha256d": {
                "name_en_US": "DigiByte-SHA256d",
                "name_zh_CN": "\u6781\u7279\u5e01-SHA256d",
                "name_zh_TW": "\u6975\u7279\u5e63-SHA256d",
                "display_name": "DigiByte",
                "display_code": "DGB-SHA256D",
                "unit": "hash",
                "scale": "T",
                "algo": "SHA256d",
                "miner": "SHA256d ASICs",
                "addr_regx": "[DS][0-9A-Za-z]{27,35}",
                "rate": 5,
                "rate_real": 17,
                "rate_type": "PPS",
                "payout_threshold": 500,
                "pool_addr": ["stratum+tcp://dgb-sha256d.f2pool.com:11110"],
                "address_url": ["digibyte-sha256d", "dgb-sha256d"],
                "tutorial_url_key": "dgb",
                "hashrate_url_name": "digibyte-sha256d",
                "api_url_name": "digibyte-sha256d",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": "https://digiexplorer.info/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "dgb-scrypt": {
                "name_en_US": "DigiByte-Scrypt",
                "name_zh_CN": "\u6781\u7279\u5e01-Scrypt",
                "name_zh_TW": "\u6975\u7279\u5e63-Scrypt",
                "display_name": "DigiByte",
                "display_code": "DGB-SCRYPT",
                "unit": "hash",
                "scale": "G",
                "algo": "Scrypt",
                "miner": "Scrypt ASICs",
                "addr_regx": "[DS][0-9A-Za-z]{27,35}",
                "rate": 5,
                "rate_real": 17,
                "rate_type": "PPS",
                "payout_threshold": 500,
                "pool_addr": ["stratum+tcp://dgb-scrypt.f2pool.com:11111"],
                "address_url": ["digibyte-scrypt", "dgb-scrypt"],
                "tutorial_url_key": "dgb",
                "hashrate_url_name": "digibyte-scrypt",
                "api_url_name": "digibyte-scrypt",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": "https://digiexplorer.info/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "dgb-skein": {
                "name_en_US": "DigiByte-Skein",
                "name_zh_CN": "\u6781\u7279\u5e01-Skein",
                "name_zh_TW": "\u6975\u7279\u5e63-Skein",
                "display_name": "DigiByte",
                "display_code": "DGB-SKEIN",
                "unit": "hash",
                "scale": "G",
                "algo": "Skein",
                "miner": "Skein ASICs",
                "addr_regx": "[DS][0-9A-Za-z]{27,35}",
                "rate": 5,
                "rate_real": 17,
                "rate_type": "PPS",
                "payout_threshold": 500,
                "pool_addr": ["stratum+tcp://dgb-skein.f2pool.com:11113"],
                "address_url": ["digibyte-skein", "dgb-skein"],
                "tutorial_url_key": "dgb",
                "hashrate_url_name": "digibyte-skein",
                "api_url_name": "digibyte-skein",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": "https://digiexplorer.info/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "dgb-qubit": {
                "name_en_US": "DigiByte-Qubit",
                "name_zh_CN": "\u6781\u7279\u5e01-Qubit",
                "name_zh_TW": "\u6975\u7279\u5e63-Qubit",
                "display_name": "DigiByte",
                "display_code": "DGB-QUBIT",
                "unit": "hash",
                "scale": "G",
                "algo": "Qubit",
                "miner": "Qubit ASICs",
                "addr_regx": "[DS][0-9A-Za-z]{27,35}",
                "rate": 5,
                "rate_real": 17,
                "rate_type": "PPS",
                "payout_threshold": 500,
                "pool_addr": ["stratum+tcp://dgb-qubit.f2pool.com:11114"],
                "address_url": ["digibyte-qubit", "dgb-qubit"],
                "tutorial_url_key": "dgb",
                "hashrate_url_name": "digibyte-qubit",
                "api_url_name": "digibyte-qubit",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": "https://digiexplorer.info/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "dgb-odocrypt": {
                "name_en_US": "DigiByte-Odocrypt",
                "name_zh_CN": "\u6781\u7279\u5e01-Odocrypt",
                "name_zh_TW": "\u6975\u7279\u5e63-Odocrypt",
                "display_name": "DigiByte",
                "display_code": "DGB-ODOCRYPT",
                "unit": "hash",
                "scale": "G",
                "algo": "Odocrypt",
                "miner": "FPGA Miner",
                "addr_regx": "[DS][0-9A-Za-z]{27,35}",
                "rate": 5,
                "rate_real": 17,
                "rate_type": "PPS",
                "payout_threshold": 500,
                "pool_addr": ["stratum+tcp://dgb-odocrypt.f2pool.com:11115"],
                "address_url": ["digibyte-odocrypt", "dgb-odocrypt"],
                "tutorial_url_key": "dgb",
                "hashrate_url_name": "digibyte-odo",
                "api_url_name": "digibyte-odo",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": "https://digiexplorer.info/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "mona": {
                "name_en_US": "Monacoin",
                "name_zh_CN": "\u840c\u5948\u5e01",
                "name_zh_TW": "\u840c\u5948\u5e63",
                "display_name": "Monacoin",
                "display_code": "MONA",
                "unit": "hash",
                "scale": "G",
                "algo": "Lyra2REv2",
                "miner": "Lyra2REv2 ASICs",
                "addr_regx": "[MP][0-9a-zA-Z]{20,60}",
                "rate": 4,
                "rate_real": 7,
                "rate_type": "PPS",
                "payout_threshold": 10,
                "pool_addr": ["stratum+tcp://mona.f2pool.com:20593"],
                "address_url": ["mona"],
                "tutorial_url_key": "mona",
                "hashrate_url_name": "monacoin",
                "api_url_name": "monacoin",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "support_manual_withdraw": true,
                "tx_explorer": "http://mona.chainsight.info/tx/{}",
                "is_lab_currency": true,
                "qq": 297818526
            },
            "btm": {
                "name_en_US": "Bytom",
                "name_zh_CN": "\u6bd4\u539f\u94fe",
                "name_zh_TW": "\u6bd4\u539f\u93c8",
                "display_name": "Bytom",
                "display_code": "BTM",
                "unit": "hash",
                "scale": "K",
                "algo": "Tensority",
                "miner": "Tensority ASICs",
                "addr_regx": "bm1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]+",
                "rate": 3,
                "rate_real": 4,
                "rate_type": "PPS",
                "payout_threshold": 5,
                "pool_addr": ["stratum+tcp://btm.f2pool.com:9221"],
                "address_url": ["btm", "bytom"],
                "hashrate_url_name": "btm",
                "api_url_name": "btm",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "http://blockmeta.com/tx/{}",
                "is_lab_currency": true,
                "qq": 861598609
            },
            "xvg-blake2s": {
                "name_en_US": "Verge-black2s",
                "name_zh_CN": "Verge-black2s",
                "name_zh_TW": "Verge-black2s",
                "display_name": "Verge",
                "display_code": "XVG-BLACK2S",
                "unit": "hash",
                "scale": "G",
                "algo": "Blake2s",
                "miner": "GPU Rigs",
                "addr_regx": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "rate": 5,
                "rate_real": 30,
                "rate_type": "PPS",
                "payout_threshold": 200,
                "pool_addr": ["stratum+tcp://xvg-blake2s.f2pool.com:9008"],
                "address_url": ["verge", "xvg", "verge-blake2s", "xvg-blake2s"],
                "tutorial_url_key": "xvg",
                "hashrate_url_name": "verge-blake2s",
                "api_url_name": "verge-blake2s",
                "mining_center_name": "xvg-blake2s",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": " https://vergechain.org/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "xvg-scrypt": {
                "name_en_US": "Verge-scrypt",
                "name_zh_CN": "Verge-scrypt",
                "name_zh_TW": "Verge-scrypt",
                "display_name": "Verge",
                "display_code": "XVG-SCRYPT",
                "unit": "hash",
                "scale": "G",
                "algo": "Scrypt",
                "miner": "Scrypt ASICs",
                "addr_regx": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "rate": 5,
                "rate_real": 30,
                "rate_type": "PPS",
                "payout_threshold": 200,
                "pool_addr": ["stratum+tcp://xvg-scrypt.f2pool.com:9009"],
                "address_url": ["verge-scrypt", "xvg-scrypt"],
                "tutorial_url_key": "xvg",
                "hashrate_url_name": "verge-scrypt",
                "api_url_name": "verge-scrypt",
                "mining_center_name": "xvg-scrypt",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": " https://vergechain.org/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "xvg-x17": {
                "name_en_US": "Verge-x17",
                "name_zh_CN": "Verge-x17",
                "name_zh_TW": "Verge-x17",
                "display_name": "Verge",
                "display_code": "XVG-X17",
                "unit": "hash",
                "scale": "G",
                "algo": "X17",
                "miner": "GPU Rigs",
                "addr_regx": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "rate": 5,
                "rate_real": 30,
                "rate_type": "PPS",
                "payout_threshold": 200,
                "pool_addr": ["stratum+tcp://xvg-x17.f2pool.com:9010"],
                "address_url": ["verge-x17", "xvg-x17"],
                "tutorial_url_key": "xvg",
                "hashrate_url_name": "verge-x17",
                "api_url_name": "verge-x17",
                "mining_center_name": "xvg-x17",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": " https://vergechain.org/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "xvg-lyra": {
                "name_en_US": "Verge-Lyra2REv2",
                "name_zh_CN": "Verge-Lyra2REv2",
                "name_zh_TW": "Verge-Lyra2REv2",
                "display_name": "Verge",
                "display_code": "XVG-LYRA2REV2",
                "unit": "hash",
                "scale": "G",
                "algo": "Lyra2REv2",
                "miner": "Lyra2REv2 ASICs",
                "addr_regx": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "rate": 5,
                "rate_real": 30,
                "rate_type": "PPS",
                "payout_threshold": 200,
                "pool_addr": ["stratum+tcp://xvg-lyra.f2pool.com:9012"],
                "address_url": ["verge-lyra", "xvg-lyra"],
                "tutorial_url_key": "xvg",
                "hashrate_url_name": "verge-lyra",
                "api_url_name": "verge-lyra",
                "mining_center_name": "xvg-lyra",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": " https://vergechain.org/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "xvg-groestl": {
                "name_en_US": "Verge-Myriad-Groestl",
                "name_zh_CN": "Verge-Myriad-Groestl",
                "name_zh_TW": "Verge-Myriad-Groestl",
                "display_name": "Verge",
                "display_code": "XVG-GROESTL",
                "unit": "hash",
                "scale": "G",
                "algo": "Myriad-Groestl",
                "miner": "Baikal Miner",
                "addr_regx": "[DE][1-9A-HJ-NP-Za-km-z]{27,35}",
                "rate": 5,
                "rate_real": 30,
                "rate_type": "PPS",
                "payout_threshold": 200,
                "pool_addr": ["stratum+tcp://xvg-groestl.f2pool.com:9011"],
                "address_url": ["verge-groestl", "xvg-groestl"],
                "tutorial_url_key": "xvg",
                "hashrate_url_name": "verge-groestl",
                "api_url_name": "verge-groestl",
                "mining_center_name": "xvg-groestl",
                "versions": [],
                "is_anonymous_currency": true,
                "tx_explorer": " https://vergechain.org/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 674791710
            },
            "pgn": {
                "name_en_US": "Pigeoncoin",
                "name_zh_CN": "\u9e3d\u5b50\u5e01",
                "name_zh_TW": "\u9d3f\u5b50\u5e63",
                "display_name": "Pigeoncoin",
                "display_code": "PGN",
                "unit": "hash",
                "scale": "M",
                "algo": "X21S",
                "miner": "GPU Rigs",
                "addr_regx": "P[a-zA-Z0-9]{27,34}",
                "rate": 5,
                "rate_type": "PPS",
                "payout_threshold": 500,
                "pool_addr": ["stratum+tcp://pigeon.f2pool.com:5750"],
                "address_url": ["pigeon", "pigeoncoin", "pgn"],
                "hashrate_url_name": "pigeon",
                "api_url_name": "pigeon",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://explorer.pigeoncoin.org/tx/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 993080319
            },
            "rvn": {
                "name_en_US": "Ravencoin",
                "name_zh_CN": "\u6e21\u9e26\u5e01",
                "name_zh_TW": "\u6e21\u9d09\u5e63",
                "display_name": "Ravencoin",
                "display_code": "RVN",
                "unit": "hash",
                "scale": "M",
                "algo": "KawPow",
                "miner": "GPU Rigs",
                "addr_regx": "[Rr][1-9A-HJ-NP-Za-km-z]{33}",
                "rate": 3,
                "rate_real": 7,
                "rate_type": "PPS",
                "payout_threshold": 100,
                "pool_addr": ["stratum+tcp://raven.f2pool.com:3636"],
                "address_url": ["raven", "ravencoin", "rvn"],
                "hashrate_url_name": "raven",
                "api_url_name": "raven",
                "versions": [],
                "is_wallet_currency": true,
                "is_anonymous_currency": true,
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "qq": 993080319
            },
            "rvn-pri": {
                "name_en_US": "Ravencoin",
                "name_zh_CN": "\u6e21\u9e26\u5e01",
                "name_zh_TW": "\u6e21\u9d09\u5e63",
                "display_name": "Ravencoin",
                "display_code": "RVN",
                "unit": "hash",
                "scale": "M",
                "algo": "X16Rv2",
                "miner": "GPU Rigs",
                "addr_regx": "[Rr][1-9A-HJ-NP-Za-km-z]{33}",
                "rate": 3,
                "rate_type": "PPS",
                "payout_threshold": 100,
                "pool_addr": ["stratum+tcp://raven-pri.f2pool.com"],
                "address_url": ["ravenp"],
                "hashrate_url_name": "ravenp",
                "api_url_name": "ravenp",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "is_private_pool": true,
                "is_lab_currency": true,
                "is_show_index": false
            },
            "aion": {
                "name_en_US": "Aion",
                "name_zh_CN": "Aion",
                "name_zh_TW": "Aion",
                "display_name": "Aion",
                "display_code": "AION",
                "unit": "sol",
                "scale": "K",
                "algo": "Equihash 210,9",
                "miner": "GPU Rigs",
                "addr_regx": "(0[xX])?a[0-9][0-9A-Fa-f]{62}",
                "rate": 5,
                "rate_real": 20,
                "rate_type": "PPS",
                "payout_threshold": 10,
                "pool_addr": ["stratum+tcp://aion.f2pool.com:6677"],
                "address_url": ["aion"],
                "hashrate_url_name": "aion",
                "api_url_name": "aion",
                "versions": [],
                "is_wallet_currency": false,
                "is_anonymous_currency": true,
                "tx_explorer": "https://mainnet.aion.network/#/transaction/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "is_show_index": false,
                "qq": 861600386
            },
            "cfx": {
                "name_en_US": "Conflux",
                "name_zh_CN": "Conflux",
                "name_zh_TW": "Conflux",
                "display_name": "Conflux",
                "display_code": "CFX",
                "unit": "hash",
                "scale": "M",
                "algo": "Octopus",
                "miner": "GPU Rigs",
                "addr_regx": "(0[xX])?[0-9A-Fa-f]{40}|cfx:[abcdefghjkmnprstuvwxyz0123456789]{42}",
                "rate": 3,
                "rate_real": 3,
                "rate_type": "PPS",
                "payout_threshold": 10,
                "pool_addr": ["stratum+tcp://cfx.f2pool.com:6800"],
                "address_url": ["conflux"],
                "hashrate_url_name": "conflux",
                "api_url_name": "conflux",
                "is_wallet_currency": true,
                "is_anonymous_currency": false,
                "tx_explorer": "https://www.confluxscan.io/transaction/{}",
                "addr_explorer": "https://www.confluxscan.io/address/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "launch_date": 1604448001,
                "qq": 1126974705
            },
            "pmeer": {
                "name_en_US": "Qitmeer",
                "name_zh_CN": "Qitmeer",
                "name_zh_TW": "Qitmeer",
                "display_name": "Qitmeer",
                "display_code": "PMEER",
                "unit": "hash",
                "scale": "G",
                "algo": "Keccak256",
                "miner": "FPGA",
                "addr_regx": "[T][a-zA-Z0-9]{27,34}",
                "rate": 3,
                "rate_real": 3,
                "rate_type": "PPS",
                "payout_threshold": 10,
                "pool_addr": ["stratum+tcp://pmeer.f2pool.com:6900"],
                "address_url": ["qitmeer"],
                "hashrate_url_name": "qitmeer",
                "api_url_name": "qitmeer",
                "is_wallet_currency": true,
                "is_anonymous_currency": false,
                "tx_explorer": "https://explorer.qitmeer.io/tx/{}",
                "addr_explorer": "https://explorer.qitmeer.io/address/{}",
                "is_lab_currency": true,
                "support_manual_withdraw": true,
                "launch_date": 1606608001,
                "qq": 820237304
            },
            "auto-equihash": {
                "name_en_US": "",
                "name_zh_CN": "",
                "name_zh_TW": "",
                "display_name": "auto-equihash",
                "display_code": "AUTO-EQUIHASH",
                "show_code": "code_ZEC Profit-Switching",
                "show_title": "title_ZEC Profit-Switching",
                "unit": "sol",
                "scale": "K",
                "algo": "Equihash",
                "miner": "Equihash ASICs",
                "addr_regx": "",
                "rate": 4,
                "rate_type": "PPS",
                "payout_threshold": 1,
                "pool_addr": ["stratum+tcp://equihash.f2pool.com:5100"],
                "address_url": ["auto-equihash"],
                "hashrate_url_name": "auto-equihash",
                "multi_currency_key": ["zec", "zen"],
                "api_url_name": "auto-equihash",
                "tutorial_url_key": "equihash",
                "tutorial_url_key_en": "zcash",
                "versions": [],
                "is_wallet_currency": true,
                "is_anonymous_currency": false,
                "is_lab_currency": false,
                "is_show_index": false,
                "qq": 861594112
            },
            "sha256d": {
                "name_en_US": "",
                "name_zh_CN": "",
                "name_zh_TW": "",
                "display_name": "sha256d",
                "display_code": "SHA256D",
                "show_code": "code_BTC Profit-Switching",
                "show_title": "title_BTC Profit-Switching",
                "unit": "hash",
                "scale": "T",
                "algo": "SHA256d",
                "miner": "SHA256d ASICs",
                "addr_regx": "",
                "rate": 2.5,
                "rate_type": "PPS",
                "payout_threshold": 0.005,
                "pool_addr": ["stratum+tcp://sha256d.f2pool.com:6100"],
                "address_url": ["sha256d"],
                "hashrate_url_name": "sha256d",
                "multi_currency_key": ["btc", "bch", "bsv"],
                "api_url_name": "sha256d",
                "tutorial_url_key": "btc-auto-switch",
                "tutorial_url_key_en": "bitcoin",
                "versions": [],
                "is_wallet_currency": true,
                "is_anonymous_currency": false,
                "is_lab_currency": false,
                "is_show_index": false,
                "qq": 861594112
            }
        }
        var CHART_OPTION = {
            legend: {show: false},
            grid: [{top: 40, bottom: 20, left: 10, right: 10, containLabel: true}],
            tooltip: {
                show: true,
                trigger: 'axis',
                backgroundColor: 'rgba(52, 73, 91, 0.8)',
                borderWidth: 0,
                padding: 0,
                textStyle: {color: '#fff', fontSize: 12, lineHeight: 24},
                extraCssText: 'border-radius: 10px;',
            },
            axisPointer: {
                lineStyle: {
                    color: '#2149c8',
                }
            },
            xAxis: {
                type: 'time',
                nameLocation: 'start',
                nameTextStyle: {color: '#adadad', fontSize: CHART_AXIS_FONT_SIZE},
                nameGap: 20,
                axisLabel: {
                    color: '#8d9ea7',
                    fontSize: CHART_AXIS_FONT_SIZE,
                    showMaxLabel: false,
                    formatter: function (val) {
                        return moment(new Date(parseInt(val, 10))).format(CHART_INTERVAL === '30min' ? 'MM-DD HH:mm' : 'MM-DD');
                    },
                    rotate: $('#chart-miner-rate').width() < 1100 ? 40 : 0
                },
                axisLine: {show: true, lineStyle: {color: '#e7e7e7', width: 1}},
                splitLine: {show: true, lineStyle: {opacity: 0.4}},
            },
            yAxis: [{
                type: 'value',
                nameTextStyle: {color: '#8d9ea7', fontSize: CHART_AXIS_FONT_SIZE},
                nameGap: 16,
                axisLabel: {color: '#999', fontSize: CHART_AXIS_FONT_SIZE,},
                axisTick: {show: false},
                axisLine: {show: true, lineStyle: {color: '#e7e7e7', width: 1}},
                splitNumber: 8,
                splitLine: {show: true, lineStyle: {opacity: 0.4}},
            }, {
                type: 'value',
                nameTextStyle: {color: '#8d9ea7', fontSize: CHART_AXIS_FONT_SIZE},
                nameGap: 16,
                axisLabel: {color: '#999', fontSize: CHART_AXIS_FONT_SIZE,},
                axisTick: {show: false},
                axisLine: {show: true, lineStyle: {color: '#e7e7e7', width: 1}},
//max: 100,
                splitLine: {show: false},
            }],
            series: [{
                type: 'line',
                showSymbol: false,
                smooth: true,
            }, {
                type: 'line',
                showSymbol: false,
                yAxisIndex: 1,
                smooth: false,
                lineStyle: {
                    normal: {
                        color: '#DF8787',
                        width: 2
                    }
                },
                itemStyle: {
                    borderColor: '#DF8787',
                    borderWidth: 2,
                    color: '#DF8787',
                },
            }]
        };
        var SWITCH_COLOR = [
            {line: '#2889fc', area: ['rgba(132, 178, 252, 0.03)', 'rgba(44, 120, 249, 0.3)']}, // blue
            {line: '#d472c7', area: ['rgba(217, 206, 255, 0.03)', 'rgba(212, 114, 199, 0.3)']}, // pink
            {line: '#74d48f', area: ['rgba(116, 212, 143, 0.03)', 'rgba(116, 212, 143, 0.3)']}, // green
            {line: '#e43f2f', area: ['rgba(204, 192, 248, 0.03)', 'rgba(228, 63, 47, 0.3)']}, // red
        ];
        var COLOR_ZERO = {line: '#8d9ea7', area: ['rgba(192, 208, 217, 0.03)', 'rgba(197, 206, 210, 0.3)']};
//add chart legend for auto-switch

        CHART_OPTION.series[0] = {
            type: 'line',
            showSymbol: false,
            smooth: true,
            lineStyle: {
                normal: {
                    color: '#2053e9',
                    width: 2
                }
            },
            itemStyle: {
                borderColor: '#2053e9',
                borderWidth: 2,
                color: '#2053e9',
            },
            areaStyle: {
                color: {
                    type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
                    colorStops: [{
                        offset: 0, color: 'rgba(44, 120, 249, 0.3)'
                    }, {
                        offset: 1, color: 'rgba(45, 123, 250, 0.03)'
                    }],
                },
            }
        };


//<script>

        initCopyBtn('.btn-copy-input')

        function judgeSmallWithdrawAble() {
            var $container = $('.small-withdrawal-container');
            var current_wallet = '0x62dD3a1d95DB1E4BeD53001291BF04c3f689B515';
            var threshold = Number('0.1');
            var balance = Number('0.04104547');
            var value_today = Number('0.00105325');
            var small_withdraw_time = new Date('' || 0).getTime() / 1000; //预计支付时间
            var now = new Date().getTime() / 1000;
            var isWithdrawAble = true;
//anonymous page has no applied button situation
            $container.find('.apply').toggle(true);
            var tip = '';
            if (hashrate > 0) {
                tip = '您正在挖矿，不能申请小额提币。';
            } else if (value_today > 0) {
                tip = '如需小额提币，请您于今日已挖收益结算后发送申请。';
            } else if (threshold && balance >= threshold) {
                tip = '您的账户余额已超过起付额，无需申请小额提币。';
            } else if (small_withdraw_time && now - small_withdraw_time <= 30 * 24 * 60 * 60) {
                tip = '小额提币 30 天内只能申请 1 次。';
            } else if (balance == 0 || (threshold && balance < 0.1 * threshold)) {
                tip = '您的账户余额太少，不足以抵扣网络转账手续费。';
            }
            if (tip) {
                isWithdrawAble = false;
            }
            $('.btn-small-withdrawal').prop("disabled", !isWithdrawAble);
            if (isWithdrawAble) {
                $container.find('.apply').removeClass('disabled');
            }
            if (isWithdrawAble) {
                $('.btn-small-withdrawal').attr('data-toggle', 'modal').attr('data-target', '#applySmallWithdrawalAnonymousModal');
            } else {
                if ($(window).width() > 991) {
                    $('.btn-small-withdrawal-frame').tooltip({
                        title: tip,
                        trigger: "hover",
                        placement: "bottom",
                        container: ".btn-small-withdrawal-frame",
                    })
                } else {
                    $('.btn-small-withdrawal-frame').attr('data-toggle', 'modal').attr('data-target', '#smallWithdrawalRemindModal');
                    $('#smallWithdrawalRemindModal').find('.content').text(tip);
                }
            }
        }

        $("#applySmallWithdrawalAnonymousModal").on('show.bs.modal', function (e) {
            $modal = $(this);
            $modal.find('#apply-title').val('ETH' + ' ' + '申请小额提币')
            var content = '我已停止挖矿且账户余额小于最小起付额，现申请将账户余额支付到钱包地址：' +
                '\r\n' + '\r\n' +
                '0x62dD3a1d95DB1E4BeD53001291BF04c3f689B515' +
                '\r\n' + '\r\n' +
                'Number: ' + Math.floor(Math.random() * 1000000)
            $modal.find('#apply-description').val(content);
        })


        $('.mining-user-info-container, .address-table-container thead').find('[data-toggle="tooltip"]').tooltip();
        $('.btn-global-help').addClass('animate');
        $.fn.dataTable.ext.search.push(function (settings, data, dataIndex) {
            if (settings.nTable.id !== 'workers') return true;
            if (CURRENT_STATUS == data[7] || (CURRENT_STATUS === 'all' && data[7] != 2)) {
                return true;
            } else {
                return false;
            }
        });
        initHelpModal();
        initMainChart();
        formatTimestamp();

        //initWorkerTable();


        //initPayoutTable();

        // initSticky();
        // bindListTab();
        // bindStatusFilter();
        // bindMobileSort();
        // bindWinResize();
        // bindMobileWorkerDetail();
        // bindMobileSearch();
        // bindCarousel();
        // initCopyBtn('.btn-copy');
        //
        // initExportBtn();
        // bindExport();
//<script>


        function bindExport() {
            $('#modalExport').on('show.bs.modal', function (e) {
                var $btn = $(e.relatedTarget);
                $(this).data('displayCode', $btn.data('displayCode'));
                $(this).data('currency', $btn.data('currency')).find('.alert').hide();
                initExportType();
                initDatepicker($btn.data('min') * 1000, $btn.data('max') * 1000, $btn.data('init_start') * 1000);
            });
            $('#modalExport').on('hidden.bs.modal', function (e) {
                $('.pdf-container').toggle(false);
            })
// Submit
            $('body').on('click', '#modalExport .btn-submit', function () {
                var $modal = $('#modalExport');
                var startPicker = $('#ipt-start-date').pickadate('picker');
                var endPicker = $('#ipt-end-date').pickadate('picker');
                var startDate = startPicker.get('select');
                var endDate = endPicker.get('select');
                var formatType = $('input[name="format"]:checked').val();
                var $alert = $modal.find('.alert');
                var currency = $modal.data('currency');
                var displayCode = $modal.data('displayCode');
                var data;
                if (!startDate || !startDate.pick) {
                    $alert.text('请选择开始日期').show();
                    return;
                } else {
                    startDate = startDate.pick;
                }
                if (!endDate || !endDate.pick) {
                    $alert.text('请选择结束日期').show();
                    return;
                } else {
                    endDate = endDate.pick;
                }
                data = getDataBySelectedDate(parseInt(startDate / 1000, 10), parseInt(endDate / 1000, 10));
                renderExport(currency, displayCode, formatType, data, startPicker.get('select', 'yyyy-mm-dd'), endPicker.get('select', 'yyyy-mm-dd'));
            });
        }

        function initExportBtn() {
            var payout_history = [{
                "timestamp": 1614470400,
                "txid": null,
                "status": "\u4e0d\u8db3\u8d77\u4ed8\u989d 0.1 ETH",
                "status_id": 2,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.012057907222324447,
                "amount_fee": 0.004878834039702227,
                "amount_pps": 0.007179073182622219,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "226.88 MH/s",
                "payout_time": ""
            }, {
                "timestamp": 1614384000,
                "txid": null,
                "status": "\u4e0d\u8db3\u8d77\u4ed8\u989d 0.1 ETH",
                "status_id": 2,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.012832385919175559,
                "amount_fee": 0.006090777156032399,
                "amount_pps": 0.006741608763143159,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "210.08 MH/s",
                "payout_time": ""
            }, {
                "timestamp": 1614297600,
                "txid": null,
                "status": "\u4e0d\u8db3\u8d77\u4ed8\u989d 0.1 ETH",
                "status_id": 2,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.01615517747260131,
                "amount_fee": 0.007838646357524579,
                "amount_pps": 0.00831653111507673,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "260.68 MH/s",
                "payout_time": ""
            }, {
                "timestamp": 1614211200,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.05671563316107095,
                "amount_fee": 0.030581942898421144,
                "amount_pps": 0.026133690262649806,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "819.72 MH/s",
                "payout_time": 1614211200
            }, {
                "timestamp": 1614124800,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.009717159421862158,
                "amount_fee": 0.006713043564727719,
                "amount_pps": 0.003004115857134439,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1614038400,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.001155097070033049,
                "amount_fee": 0.0006949427565643,
                "amount_pps": 0.000460154313468749,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613952000,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.001064381226144633,
                "amount_fee": 0.000474615841351791,
                "amount_pps": 0.000589765384792842,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613865600,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.001142842543593146,
                "amount_fee": 0.000609490574726475,
                "amount_pps": 0.000533351968866671,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613779200,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.003524910960302917,
                "amount_fee": 0.001805922505497778,
                "amount_pps": 0.001718988454805139,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613692800,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.000907502987430079,
                "amount_fee": 0.000453402475930063,
                "amount_pps": 0.000454100511500016,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613001600,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.000612711760803058,
                "amount_fee": 0.000335613298544329,
                "amount_pps": 0.000277098462258729,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1612915200,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.00935661333433001,
                "amount_fee": 0.005314612027893984,
                "amount_pps": 0.004042001306436026,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "115.23 MH/s",
                "payout_time": 1614211200
            }, {
                "timestamp": 1612828800,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.007178078381068365,
                "amount_fee": 0.00389265329453264,
                "amount_pps": 0.003285425086535725,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1612742400,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.006755422759620314,
                "amount_fee": 0.003190501762683204,
                "amount_pps": 0.00356492099693711,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "101.81 MH/s",
                "payout_time": 1614211200
            }, {
                "timestamp": 1612656000,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.004372005598423145,
                "amount_fee": 0.002205189016094195,
                "amount_pps": 0.00216681658232895,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }]
            if (payout_history.length > 0) {
                var min = payout_history[payout_history.length - 1].timestamp;
                var max = payout_history[0].timestamp;
                var monthTime = 60 * 60 * 24 * 30;
                var init_start = max - min > monthTime ? max - monthTime : min;
                $('.btn-export').removeAttr('disabled').data('min', min).data('max', max).data('init_start', init_start);
            }
        }

//获取数据
        function getDataBySelectedDate(start, end) {
            var data = [{
                "timestamp": 1614470400,
                "txid": null,
                "status": "\u4e0d\u8db3\u8d77\u4ed8\u989d 0.1 ETH",
                "status_id": 2,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.012057907222324447,
                "amount_fee": 0.004878834039702227,
                "amount_pps": 0.007179073182622219,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "226.88 MH/s",
                "payout_time": ""
            }, {
                "timestamp": 1614384000,
                "txid": null,
                "status": "\u4e0d\u8db3\u8d77\u4ed8\u989d 0.1 ETH",
                "status_id": 2,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.012832385919175559,
                "amount_fee": 0.006090777156032399,
                "amount_pps": 0.006741608763143159,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "210.08 MH/s",
                "payout_time": ""
            }, {
                "timestamp": 1614297600,
                "txid": null,
                "status": "\u4e0d\u8db3\u8d77\u4ed8\u989d 0.1 ETH",
                "status_id": 2,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.01615517747260131,
                "amount_fee": 0.007838646357524579,
                "amount_pps": 0.00831653111507673,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "260.68 MH/s",
                "payout_time": ""
            }, {
                "timestamp": 1614211200,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.05671563316107095,
                "amount_fee": 0.030581942898421144,
                "amount_pps": 0.026133690262649806,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "819.72 MH/s",
                "payout_time": 1614211200
            }, {
                "timestamp": 1614124800,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.009717159421862158,
                "amount_fee": 0.006713043564727719,
                "amount_pps": 0.003004115857134439,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1614038400,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.001155097070033049,
                "amount_fee": 0.0006949427565643,
                "amount_pps": 0.000460154313468749,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613952000,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.001064381226144633,
                "amount_fee": 0.000474615841351791,
                "amount_pps": 0.000589765384792842,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613865600,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.001142842543593146,
                "amount_fee": 0.000609490574726475,
                "amount_pps": 0.000533351968866671,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613779200,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.003524910960302917,
                "amount_fee": 0.001805922505497778,
                "amount_pps": 0.001718988454805139,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613692800,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.000907502987430079,
                "amount_fee": 0.000453402475930063,
                "amount_pps": 0.000454100511500016,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1613001600,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.000612711760803058,
                "amount_fee": 0.000335613298544329,
                "amount_pps": 0.000277098462258729,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1612915200,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.00935661333433001,
                "amount_fee": 0.005314612027893984,
                "amount_pps": 0.004042001306436026,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "115.23 MH/s",
                "payout_time": 1614211200
            }, {
                "timestamp": 1612828800,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.007178078381068365,
                "amount_fee": 0.00389265329453264,
                "amount_pps": 0.003285425086535725,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }, {
                "timestamp": 1612742400,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.006755422759620314,
                "amount_fee": 0.003190501762683204,
                "amount_pps": 0.00356492099693711,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": "101.81 MH/s",
                "payout_time": 1614211200
            }, {
                "timestamp": 1612656000,
                "txid": "0xa47c88d6f79c9b235dd0b27762b3d5433e94558305addd04556b0c728fb32d2c",
                "status": null,
                "status_id": 100,
                "address": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "address_show": "0x62dd3a1d95db1e4bed53001291bf04c3f689b515",
                "tx_fee": false,
                "category": "payout",
                "amount": 0.004372005598423145,
                "amount_fee": 0.002205189016094195,
                "amount_pps": 0.00216681658232895,
                "currency": "ETH-ADDRESS",
                "display_code": "ETH",
                "hash_rate": 0,
                "payout_time": 1614211200
            }]
            var ret;
            var ret = [];
            end = parseInt(moment(new Date(end * 1000)).endOf('day').format('X'), 10);
            data.forEach(function (d, idx) {
                if (d.timestamp >= start && d.timestamp <= end) {
                    ret.push(d);
                }
            });
            return ret;
        }

//prepare columns conf
        function getExportTableColumnsConf(currency, isExcel) {
            var columns = [{
                data: 'timestamp',
                render: function (data, type, row) {
                    return moment(new Date(data * 1000)).format('YYYY-MM-DD');
                },
            }];
            /*columns = columns.concat({
data: 'hash_rate',
visible: false,
render: function(data) {
return data ? data.replace('hash', 'H') : '-';
},
})*/
            var containPayoutInfo = 'True' == 'True' ? true : false;
            var displayCode = $('.btn-export').data('displayCode') || currency.split('-')[0].toUpperCase();
            if (isExcel) {
                columns = columns.concat([{
                    data: 'hash_rate',
                    visible: false,
                    render: function (data) {
                        return data ? data.split(' ')[0] : '-';
                    },
                }, {
                    data: 'hash_rate',
                    visible: false,
                    render: function (data) {
                        return data ? data.replace('hash', 'H').split(' ')[1] : '-';
                    },
                }, {
                    data: 'amount',
                    visible: currency === 'btc' || currency === 'eth',
                    render: function (data, type, row) {
                        return row.amount_pps ? row.amount_pps : '';
                    },
                }, {
                    data: 'amount',
                    visible: currency === 'btc' || currency === 'eth',
                    render: function (data, type, row) {
                        return row.amount_fee ? row.amount_fee : '';
                    },
                }, {
                    data: 'amount',
                    title: currency === 'btc' || currency === 'eth' ? '合计' : '金额',
                    render: function (data, type, row) {
                        return (row.amount_total || data);
                    },
                }, {
                    data: 'ratio',
                    visible: currency === 'vcash',
                    render: function (data) {
                        return data ? ('1:' + data) : '';
                    },
                }, {
                    data: 'address',
                    visible: containPayoutInfo,
                    render: function (data) {
                        return data ? data : '-';
                    },
                }, {
                    data: 'payout_time',
                    visible: containPayoutInfo,
                    render: function (data) {
                        return data ? moment(new Date(data * 1000)).format('YYYY-MM-DD') : '-';
                    },
                }, {
                    data: 'txid',
                    visible: containPayoutInfo,
                    render: function (data, type, row) {
                        return getTXCellVal(data, row).statusText;
                    },
                }, {
                    data: 'txid',
                    visible: containPayoutInfo,
                    render: function (data, type, row) {
                        var obj = getTXCellVal(data, row);
                        return obj.statusDetail.content === obj.statusText ? '' : (obj.statusDetail.content || '');
                    }
                }]);
            } else {
                columns = columns.concat([{
                    data: 'hash_rate',
                    visible: false,
                    render: function (data) {
                        return data ? data.replace('hash', 'H') : '-';
                    },
                }, {
                    data: 'amount',
                    title: currency === 'btc' || currency === 'eth' ? '金额（合计）' : '金额',
                    render: function (data, type, row) {
                        return (row.amount_total || data) + ' ' + displayCode;
                    },
                }, {
                    data: 'txid',
                    visible: containPayoutInfo,
                    render: function (data, type, row) {
                        var txid = "tx_Unpaid ";
                        if ('currency' in row && (row.currency == 'GRIN-29' || row.currency == 'GRIN-31')) {
                            if (('wallet_type' in row && row.wallet_type == 'exchange') && ('exchange' in row && ['Bitmesh', 'AEX', 'Bitforex'].indexOf(row.exchange) > -1)) {
                                txid = "Paid ";
                            }
                        }
                        if (data && data.length > 0) {
                            if ('currency' in row && (row.currency == 'GRIN-29' || row.currency == 'GRIN-31')) {
                                return '<span style="word-break:break-all;">' + data + '</span>';
                            }
                            return data.substring(0, 16) + '...' + data.substring(48, 64);
                        } else {
                            return row.status;
                        }
                    }
                }]);
            }
            return columns;
        }

        function initExportType() {
            var tpl = '<div class="form-check form-check-inline">' +
                '<input type="radio" id="format{}" class="form-check-input" name="format" value="{}" />' +
                '<label class="form-check-label" for="format{}">{a}</label>' +
                '</div>';
            var supportArr;
            var $container = $('#modalExport .check-format-container');
            $container.empty();
            if (isIOS()) {
                $container.prev().text('受iOS系统特性限制，Excel/PDF/PNG 等格式请使用电脑进行下载。');
                supportArr = ['csv', 'txt'];
            } else {
                supportArr = ['excel', 'csv', 'txt', 'pdf', 'png'];
            }
            for (var i = 0; i < supportArr.length; i++) {
                var item = supportArr[i];
                $container.append(tpl.replace(/{}/g, item).replace('{a}', item.toUpperCase()));
            }
            $container.find('input[type="radio"]').first().prop('checked', true);
        }

        function initDatepicker(min, max, initStart) {
            $('#ipt-start-date').pickadate({
                format: 'yyyy-mm-dd',
                today: '',
                clear: '',
                close: '',
            }).pickadate('set', {
                min: new Date(min),
                max: new Date(max),
                select: new Date(initStart),
            });
            $('#ipt-end-date').pickadate({
                format: 'yyyy-mm-dd',
                today: '',
                clear: '',
                close: '',
            }).pickadate('set', {
                min: new Date(min),
                max: new Date(max),
                select: new Date(max),
            });
            $('#modalExport .input-group-text').on('click', function (e) {
                e.stopPropagation();
                var $this = $(this);
                var $ipt = $this.parents('.input-group').find('.form-control');
                var picker = $ipt.pickadate('picker');
                picker.open();
            });
        }

        function isIOS() {
            var userAgentInfo = navigator.userAgent;
            var agents = ["iPhone", "iPad", "iPod"];
            var flag = true;
            for (var i = 0; i < agents.length; i++) {
                if (userAgentInfo.indexOf(agents[i]) > 0) {
                    flag = false;
                    break;
                }
            }
            return !flag;
        }

//data是准备显示的数据
        function renderExport(currency, displayCode, formatType, data, startStr, endStr) {
            var fileName = displayCode + '-' + startStr.replace(/\s+|\//g, '_') + '-' + endStr.replace(/\s+|\//g, '_');
            if (['excel', 'csv', 'txt'].indexOf(formatType) >= 0) {
                var type = formatType === 'excel' ? 'xlsx' : formatType;
                var $table = $('#export-table-excel');
                var table_export_excel = loadExportTable(currency, data, true);
                $table.find('td').attr('t', 's');
                var wb = XLSX.utils.table_to_book($table.get(0));
                if (isIOS()) {
                    var ws = XLSX.utils.table_to_sheet($table.get(0));
                    var mime = type === 'csv' ? 'text/csv' : 'text/plain';
                    var out = XLSX.utils.sheet_to_csv(ws);
                    var dataURI = 'data:' + mime + ';charset=utf-8,' + out;
                    var encodedUri = encodeURI(dataURI);
                    var link = document.createElement('a');
                    link.setAttribute('href', encodedUri);
                    link.setAttribute('download', fileName + '.' + type);
                    document.body.appendChild(link);
                    link.click();
                } else {
                    XLSX.writeFile(wb, fileName + '.' + type);
                }
            } else {
                var table_export = loadExportTable(currency, data);
                var $modalCanvas = $('#modalCanvas');
                var $pdfContainer = $('.pdf-container');
                $pdfContainer.find('.payout-total-count').text(getTotalPayoutCount(data));
                $pdfContainer.find('.payout-time').text(startStr + ' ~ ' + endStr);
                $pdfContainer.find('.currency-code').text($('.btn-export').data('displayCode'));
                $pdfContainer.toggle(true);
                html2canvas($('.pdf-container').get(0)).then(function (canvas) {
                    $modalCanvas.find('.canvas-container').html('').get(0).appendChild(canvas);
                    $modalCanvas.modal('show');
                    canvas.toBlob(function (blob) {
                        var urlCreator = window.URL || window.webkitURL;
                        var imgUrl = urlCreator.createObjectURL(blob);
                        if (formatType === 'pdf') {
                            blobToPdf(blob, imgUrl, fileName);
                        } else {
                            var link = document.createElement('a');
                            link.download = fileName + '.png';
                            link.href = imgUrl;
                            link.click();
                        }
                    });
                });
            }
        }

//data是准备显示的数据
        function loadExportTable(currency, data, isExcel) {
            var columns = getExportTableColumnsConf(currency, isExcel);
            return loadDataToDatatable({
                $table: $(isExcel ? '#export-table-excel' : '#export-table'),
                data: data,
                extraOption: {
                    destroy: true,
                    paging: false,
                    info: false,
                    columns: columns,
                    drawCallback: function () {
                        var api = this.api();
                        var data = api.data();

                        var hashrateArr = api.column(1).data();
                        SHOW_HASHRATE = hashrateArr.filter(function (item) {
                            return item !== 0;
                        }).length > 0;
                        if (isExcel) {
                            api.columns([1, 2]).visible(SHOW_HASHRATE);
                        } else {
                            api.column(1).visible(SHOW_HASHRATE);
                        }

                    }
                },
            });
        }

        function blobToPdf(blob, imgUrl, fileName) {
            var pdf = new jsPDF('p'),
                pdfInternals = pdf.internal,
                pdfPageSize = pdfInternals.pageSize,
                pdfScaleFactor = pdfInternals.scaleFactor,
                pdfPageWidth = pdfPageSize.width,
                pdfPageHeight = pdfPageSize.height,
                pdfPageWidthPx = pdfPageWidth * pdfScaleFactor,
                count = 0;
            var addPage = function (img, height, width) {
                pdf.addImage(img, 0, -(pdfPageHeight * count), width, height);
                count++;
// for blank of last page
                if ((pdfPageHeight * count) > height) {
                    var blankHeight = pdfPageHeight * count - height;
                    pdf.setFillColor(27, 121, 223);
                    pdf.rect(0, pdfPageHeight - blankHeight, width, blankHeight, 'F');
                }
                if ((pdfPageHeight * count) < height) {
                    pdf.addPage();
                    addPage(img, height, width);
                }
            };
            var img = new Image();
            var width, height;
            img.src = imgUrl;
            img.onload = function () {
                if (img.width < pdfPageWidthPx) {
                    width = img.width / pdfScaleFactor;
                } else {
                    width = pdfPageWidth;
                }
                height = img.height / (img.width / width);
                addPage(img, height, width, 0);
                pdf.save(fileName + '.pdf');
            };
        }

        function getTotalPayoutCount(data) {
            if (!data || !data.length) return '';
            var total = Big(0);
            data.forEach(function (item) {
                if (item.amount > 0) {
                    total = total.plus(item.amount);
                }
            });
            return total.toFixed(8);
        }

        function loadDataToDatatable(params) {
            var $table = params.$table;
            var data = params.data;
            var extraOption = params.extraOption;
            var opt = $.extend({}, tableOpt);
            opt.data = data;
            if (extraOption) {
                $.extend(opt, extraOption);
            }
            return $table.DataTable(opt);
        }

        function getTXCellVal(tx, row) {
            var currencyCode = row.currency.toLowerCase();
            if (row.category === 'dividends') {
                return {
                    statusText: '股份分成',
                    statusDetail: ''
                };
            }
            var statusText = '待支付';
            var statusDetail = {};
            var isGrin = (row.currency || '').toLowerCase().match('grin');
            if (tx && tx.length > 0) {
                if (isGrin && $(window).width() > 991) {
                    statusText = tx;
                } else {
                    statusText = '已支付';
                    statusDetail = {
                        title: '交易',
                        content: tx,
                    };
                }
            } else {
                if (isGrin) {
                    if (row.wallet_type === 'exchange' && ['Bitmesh', 'AEX', 'Bitforex'].indexOf(row.exchange) > -1) {
                        statusText = '已支付';
                    } else {
                        statusText = '待支付';
                    }
                } else {
                    if (row.status_id < 100) {
                        statusText = '存入余额';
                    } else if (row.status_id === 200) {
                        statusText = '待支付';
                    } else {
                        statusText = row.status || '存入余额';
                    }
                    if (row.status !== '待支付') {
                        statusDetail = {
                            title: '原因',
                            content: row.status,
                        };
                    }
                }
            }
            return {
                statusText: statusText,
                statusDetail: statusDetail,
            };
        }

        function initWorkerTable() {
            WORKER_TABLE = $('#workers').DataTable({
                dom: 'ltipr',
                language: oLanguage,
                paging: false,
                info: false,
                autoWidth: false,
                searching: true,
                fixedHeader: {
                    header: true,
                    headerOffset: $('.page-wrapper.has-tips').length > 0 ? ($(window).width() > 991 ? 230 : 190) : ($(window).width() > 991 ? 192 : 150),
                },
                columnDefs: [
                    {targets: 1, orderData: 10, type: 'formatted-num', visible: IS_ZOOM_MODE || WIN_WIDTH > 991},
                    {targets: 2, orderData: 11, type: 'formatted-num'},
                    {targets: 3, orderData: 12, type: 'formatted-num'},
                    {targets: 4, orderData: 13, type: 'formatted-num'},
                    {targets: 5, orderData: 14, visible: IS_ZOOM_MODE || WIN_WIDTH > 991},
                    {targets: 9, orderable: false},
                    {targets: [10, 11, 12, 13, 14], visible: false},
                ],
                sortCellsTop: true,
                order: [],
                drawCallback: function () {
                    $('.worker-filter').removeClass('hide');
                    $('#workers tbody td.last-share').each(function () {
                        var $this = $(this);
                        var comment = $this.find('.comment').html();
                        var status = Number($this.siblings('.status').text() || '');
                        var content = renderLastShare($this.data('timestamp'), $this.siblings('.status').text());
                        if (comment) content += '<br><span style="white-space: nowrap; font-weight: normal; color: ' +
                            (status === 2 ? '#34495e' : '#eb5648') + ';">(' + comment + ')</span>';
                        $this.html(content);
                    });
                },
            });

            initSingleWorkerChart();
            bindWorkerSearch();
        }

        function initPayoutTable() {
            PAYOUT_TABLE = $('#payouts').DataTable({
                dom: 'ltipr',
                language: oLanguage,
                searching: true,
                autoWidth: false,
                sort: false,
                pagingType: 'full_numbers',
                lengthChange: false,
                drawCallback: function () {
                    $('#payouts tbody td.date, #payouts tbody td.payout-time').each(function () {
                        var $this = $(this);
                        var timestamp = $this.data('timestamp');
                        $this.find('.date-val').text(timestamp ? moment(new Date(timestamp * 1000)).format('YYYY-MM-DD') : '-');
                    });
// tooltip
                    var $tooltip = $('#payouts .txid .item-tooltip');
                    $tooltip.each(function () {
                        var $this = $(this);
                        var $td = $this.parents('td');
                        var $tr = $this.parents('tr');
                        if ($this.hasClass('tx-paste')) {
                            var tx = $this.attr('title');
                            var txExplorer = 'https://etherscan.io/tx/{}'.replace('{}', tx);
                            if (('eth-address' == 'sha256d' || 'eth-address' == 'auto-equihash') && $tr.data('record').currency) {
                                txExplorer = CURRENCY_CONFIG[$tr.data('record').currency]["tx_explorer"].replace('{}', tx);
                            }
                            if ($this.attr('tx_explorer')) {
                                txExplorer = $this.attr('tx_explorer').replace('{}', tx);
                            }
                            $this.removeAttr('title').tooltip({
                                container: $this,
                                trigger: 'hover focus',
                                html: true,
                                title: (txExplorer ? '<a class="tx" href="' + txExplorer + '" target="_blank">' + tx + '</a>' : '<span>' + tx + '</span>') + ' <button class="btn-copy" type="button">复制</button>',
                            });
                        } else {
                            var conf = {
                                container: $td,
                            };
                            if ($this.hasClass('tooltip-comment')) {
                                conf.title = $this.parents('td').find('.comment').html();
                                conf.html = true;
                            }
                            $this.tooltip(conf);
                        }
                    });
                },
            });
            bindMobileRowCollapse();
        }

        function renderLastShare(data, status) {
            if (data == 0) {
                return '';
            }
            var ts = Math.floor(Date.now() / 1000);
            var ago = '';
            var diff = ts - data;
            var minute = (Math.floor(diff / 60) % 60).toFixed(0);
            var hour = (diff / 3600).toFixed(0);
            var day = (diff / 86400).toFixed(0);
            if (diff < 3600) {
                ago = "{minutes}分前".replace("{minutes}", minute);
            } else if (diff < 86400) {
                ago = "{hours}时{minutes}分前".replace("{hours}", hour).replace("{minutes}", minute);
            } else {
                ago = "{days}天前".replace("{days}", day);
            }
            if (status == 1) {
                return '<div style="color: #eb5648;">' + moment(new Date(data * 1000)).format((IS_ZOOM_MODE ? '' : 'YYYY-') + 'MM-DD HH:mm') +
                    '<br class="d-lg-none"> <span style="font-size: 12px;">(' + ago + ')</span></div>';
            } else if (status == 2) {
                return moment(new Date(data * 1000)).format((IS_ZOOM_MODE ? '' : 'YYYY-') + 'MM-DD HH:mm') +
                    '<br class="d-lg-none"> <span style="font-size: 12px;">(' + ago + ')</span>';
            } else {
                return moment(new Date(data * 1000)).format((IS_ZOOM_MODE ? '' : 'YYYY-') + 'MM-DD HH:mm');
            }
        }

        function initSticky() {
            STICKY_LIST_TAB_CONTAINER = stickybits('.list-tab-container', {
                stickyBitStickyOffset: $('.page-wrapper.has-tips').length > 0 ? (WIN_WIDTH > 991 ? 108 : 78) : (WIN_WIDTH > 991 ? 68 : 48),
                useStickyClasses: true
            });
            stickybits('.list-sort-container', {
                stickyBitStickyOffset: $('.page-wrapper.has-tips').length > 0 ? 154 : 124,
                useStickyClasses: true
            });
            stickybits('.side-container', {
                stickyBitStickyOffset: $('.page-wrapper.has-tips').length > 0 ? 184 : 126,
                useStickyClasses: true
            });
            STICKY_WORKER_STATUS_FILTER = stickybits('.worker-grid-header', {
                stickyBitStickyOffset: $('.page-wrapper.has-tips').length > 0 ? (WIN_WIDTH > 991 ? 184 : 206) : (WIN_WIDTH > 991 ? 144 : 176),
                useStickyClasses: true,
            });
        }

        function bindMobileRowCollapse() {
            $('.page-address .payout-table .table').on('click', 'tbody tr:not(.row-collapse) td:not(.dataTables_empty), .btn-collapse', function (e) {
                if ($(window).width() > 991) return;
                e.stopPropagation();
                var $tr = $(this).closest('tr');
                var $table = $(this).parents('.table');
                var _dataTable = $table.DataTable();
                var row = _dataTable.row($tr);
                if (row.child.isShown()) {
// close child
                    $('.collapse-container', row.child()).slideUp(function () {
                        row.child.hide();
                        $tr.removeClass('shown');
                    });
                } else {
// Open child
                    _dataTable.rows().every(function () {
                        this.child.hide();
                    });
                    $table.find('tbody tr').removeClass('shown');
                    row.child(formatPayoutCollapseRow(row.data(), $tr), 'row-collapse').show();
                    $tr.addClass('shown');
                    $('.collapse-container', row.child()).slideDown();
                }
            }).on('click', '.btn-collapse-hidden', function () {
                var $tr = $(this).closest('tr').prev('tr');
                var $table = $(this).parents('.table');
                var row = $table.DataTable().row($tr);
                $('.collapse-container', row.child()).slideUp(function () {
                    row.child.hide();
                    $tr.removeClass('shown');
                });
            }).on('page.dt', function () {
                var headHeight = $('.has-tips').length > 0 ? 88 : 48;
                $('html, body').animate({'scrollTop': $('.address-table-container').offset().top - headHeight}, 1000);
            });
        }

        function formatPayoutCollapseRow(data, $tr) {
            var currency = 'eth-address';
            var txid = $tr.find('.txid').data('txid');
            var txTitle = txContent = '';
            var status = $tr.find('.txid').data('status');
            var extraData = $tr.data('record');
            var txExplorer = 'https://etherscan.io/tx/{}'.replace('{}', txid);
            if (extraData.crypto_wallet_explorer) {
                txExplorer = extraData.crypto_wallet_explorer.replace('{}', txid);
            }
            txTitle = txid ? '交易' : '原因';
            txContent = (txid && txExplorer ? '<a href="' + txExplorer + '" target="_blank">' : '<span>') +
                (txid || status) + (txid && txExplorer ? '</a>' : '</span>') +
                (txid ? '&nbsp;&nbsp;<button class="btn-copy">复制</span>' : '');
            var ret = '<div class="collapse-container">';

            ret += (currency === 'btc' || currency === 'eth' ? '<div class="item"><h4>金额（PPS）</h4><div>' + extraData.amount_pps + ' ' + currency.toUpperCase() + '</div></div>' +
                '<div class="item"><h4>金额（奖励）</h4><div>' + extraData.amount_fee + ' ' + currency.toUpperCase() + '</div></div>' : '')

            ret += (currency === 'btc' || currency === 'ltc' ? '<div class="item"><h4>难度</h4><div>' + data[4] + '</div></div>' : '')

            ret +=
                '<div class="item"><h4>地址</h4><div><a href="" target="_blank" class="text-wrap">' + extraData['address'] + '</a></div></div>' +
                (extraData.payout_time ? '<div class="item"><h4>支付时间</h4><div>' + moment(new Date(extraData.payout_time * 1000)).format('YYYY-MM-DD') + '</div></div>' : '') +
                ((txid || status !== '待支付') ? '<div class="item"><h4>' + txTitle + '</h4>' + '<div class="text-wrap">' + txContent + '</div></div>' : '') +
                (data[7] ? '<div class="item"><h4>备注</h4><div>' + data[7] + '</div></div>' : '') +
                '<div class="text-center"><a href="javascript:void(0)" class="btn-normal btn-collapse-hidden">收起 <i class="fa fa-chevron-up"></i></a></div></div>';
            return ret;
        }

        function bindWorkerSearch() {
            $('.worker-filter').on('input', 'input', function () {
                $(this).parent().find('.icon-clear-search').toggle($(this).val().length > 0);
            }).on('click', '.btn-normal', function () {
                WORKER_TABLE.search($(this).parents('.worker-filter').find('.search-input-container input').val()).draw();
            }).on('click', '.icon-clear-search', function () {
                var $filter = $(this).parents('.worker-filter');
                $(this).hide();
                $filter.find('input').val('');
                $filter.find('.btn-normal').click();
            });
            WORKER_TABLE.on('search.dt', function (e) {
                var searchVal = $('.worker-filter input').val();
                var searchData = WORKER_TABLE.rows({filter: 'applied'}).data();
                var $totalHead = $('#head-row-total');
                var $statusFilter = $('.worker-status-filter');
                var $activeTag = $('#tags-list .list-group-item.active');
                if ($('.side-container').css('display') !== 'none' && $activeTag.length > 0) {
                    $statusFilter.find('.nav-status-all .status-count').text($activeTag.find('.text-all').text());
                    $statusFilter.find('.nav-status-active .status-count').text($activeTag.find('.text-active').text());
                    $statusFilter.find('.nav-status-offline .status-count').text($activeTag.find('.text-offline').text());
                    $statusFilter.find('.nav-status-dead .status-count').text($activeTag.find('.text-dead').text());
                }
                $totalHead.toggle(CURRENT_STATUS === 'all' && ($activeTag.length > 0 ? $activeTag.hasClass('J-tag-all') : true));
            });
        }

// single worker chart
        function initSingleWorkerChart() {
            $('.worker-table .table').on('click', '.btn-collapse, tbody td:nth-child(n+2)', function (e) {
                e.preventDefault();
                e.stopPropagation();
                if ($(window).width() <= 991) return false;
                var $tr = $(this).parents('tr');
                var row = WORKER_TABLE.row($tr);
                var rowData = row.data();
                var workerName = $tr.find('.btn-collapse').data('worker');
                if (row.child.isShown()) {
// close child
                    $('.collapse-container', row.child()).slideUp(function () {
                        row.child.hide();
                        $tr.removeClass('shown');
                    });
                } else {
// Open child
                    WORKER_TABLE.rows().every(function () {
                        this.child.hide();
                    });
                    $('.worker-table .table tr').removeClass('shown');
                    $tr.addClass('shown');
                    row.child(formatCollapseRow(workerName), 'row-collapse').show();
                    $('.collapse-container', row.child()).slideDown('normal', function () {
                        initWorkerChart($tr.next().find('.chart-container'), workerName);
                    });
                }
            });
        }

        function bindTags() {
            $("#tags-list, .list-sort-container").on("click", '.list-group-item', function () {
                var $target = $(this);
                $target.addClass('active').siblings().removeClass("active");
                $('.list-sort-btn.tag .btn').find('span').text($target.find('.tag-title').text());
                if ($target.hasClass('J-tag-all')) {
                    WORKER_TABLE.columns('').search('').draw();
                } else if ($target.hasClass('J-tag-ungrouped')) {
                    WORKER_TABLE.column(6).search(0).draw();
                } else {
                    WORKER_TABLE.column(6).search($target.data('tag')).draw();
                }
            });
        }

        function bindStatusFilter() {
            bindNavChange();
            /*if ($('.worker-status-filter .nav-status-dead').length > 0) {
showDeadMinerTip();
}*/
            $('.worker-status-filter .nav-link').on('click', function (e) {
                e.preventDefault();
                var $item = $(this);
                $item.tab('show');
                CURRENT_STATUS = $item.data('status');
                if (!WORKER_TABLE) return;
                if ($(window).width() < 992) {
                    var columnRejected = WORKER_TABLE.column(4);
                    var columnLastShare = WORKER_TABLE.column(5);
                    if (!IS_ZOOM_MODE) {
                        columnRejected.visible(CURRENT_STATUS !== 1 && CURRENT_STATUS !== 2);
                        columnLastShare.visible(CURRENT_STATUS === 1 || CURRENT_STATUS === 2);
                    }
                    $('.collapse-table-sort .item[data-sort="stalerate"]').toggle(CURRENT_STATUS !== 1 && CURRENT_STATUS !== 2);
                    $('.collapse-table-sort .item[data-sort="last_share"]').toggle(CURRENT_STATUS === 1 || CURRENT_STATUS === 2);
                }
                WORKER_TABLE.draw();
            });
        }

        function showDeadMinerTip() {
            var storage = JSON.parse(Cookies.get('feature_tip') || '{}');
            var $modal = $('#modal-feature-dead-miner');
            if (!storage.dead_miner_tip) {
                $modal.modal('show');
            }
            $modal.on('click', '.btn-got-it', function () {
                storage.dead_miner_tip = true;
                Cookies.set('feature_tip', JSON.stringify(storage), {expires: 365});
            });
        }

        function bindNavChange() {
            var $container = $('.worker-grid-header');
            update($container.find('.nav-link.active').parent());
            $container.find('.nav-link').on('click', function () {
                update($(this).parent());
            });

            function update($item) {
                $item.siblings().removeClass('act');
                $item.addClass('act').next().addClass('act');
            }
        }

        function fillTags(tagsData, tagWorker) {
            if (tagsData && tagsData.length > 0) {
                $('.J-tag-all .tag-info, .J-tag-ungrouped .tag-info').remove();
                $('.J-tag-all').append(getTagInfoTpl(tagWorker.all));
                $('.J-tag-ungrouped').append(getTagInfoTpl(tagWorker[0])).show();
                for (var i = 0; i < tagsData.length; i++) {
                    $('.J-tag-ungrouped').after(
                        $($(window).width() > 991 ? '<li></li>' : '<a></a>', {
                            class: "list-group-item J-tag-item item"
                        }).data('tag', tagsData[i].id)
                            .html('<div class="tag-title d-flex justify-content-between">' +
                                '<span>' + html_escape(tagsData[i].name) + '</span>' +
                                '</div>' +
                                getTagInfoTpl(tagWorker[tagsData[i].id]))
                    );
                }
            }
        }

        function getTagInfoTpl(data) {
            if (!data) data = {};
            var unit = data.hashrate ? HASHRATE_UNIT : 'H/s';
            return '<div class="tag-info">' +
                '<div class="hashrate">' + (data.hashrate || 0).toFixed(2) + ' <span class="unit">' +
                unit +
                '</span></div>' +
                '<div class="status"><span class="text-all">' + (data.total || 0) + '</span> / ' +
                '<span class="text-active">' + (data.active || 0) + '</span> / ' +
                '<span class="text-offline">' + (data.offline || 0) + '</span> / ' +
                '<span class="text-dead">' + (data.dead || 0) + '</span>' +
                '</div></div>';
        }

        function getTagWorker(tagsData, workersData) {
            var ret = {all: {hashrate: 0, total: 0, active: 0, offline: 0, dead: 0}};
            var statusMap = {0: 'active', 1: 'offline', 2: 'dead'};
            var groupId, worker;
            if (workersData && workersData.length) {
                for (var i = 0; i < workersData.length; i++) {
                    worker = workersData[i];
                    groupId = worker.tag;
                    if (typeof groupId !== 'number') groupId = 0;
                    if (!ret[groupId]) ret[groupId] = {hashrate: 0, total: 0, active: 0, offline: 0, dead: 0};
                    if (worker.status == 0 || worker.status == 1) {
                        ret.all.total += 1;
                        ret[groupId].total += 1;
                    }
                    ret.all.hashrate += (parseFloat(worker.hashrate) || 0);
                    ret[groupId].hashrate += (parseFloat(worker.hashrate) || 0);
                    if (statusMap[worker.status]) {
                        ret.all[statusMap[worker.status]] += 1;
                        ret[groupId][statusMap[worker.status]] += 1;
                    }
                }
            }
            return ret;
        }

        function initHelpModal() {
            $('.modal-help').on('show.bs.modal', function () {
                $('body').css({
                    position: 'fixed',
                    top: 0,
                    left: 0,
                    right: 0,
                    bottom: 0,
                });
            }).on('hide.bs.modal', function () {
                $('body').css({
                    position: '',
                    top: '',
                    left: '',
                    right: '',
                    bottom: '',
                });
            });
        }

        function initMainChart() {
            /*MAIN_CHART = echarts.init(document.getElementById('chart'));
            MAIN_CHART.setOption($.extend({}, CHART_OPTION));
            bindChartResize(MAIN_CHART);
            bindTogglePeriod();
            getHashrateData();*/

// renderChart(MAIN_CHART, null, {});
        }

        function getHashrateData() {
            MAIN_CHART.showLoading({
                text: 'loading...',
                color: '#2053e9',
                maskColor: 'rgba(255, 255, 255, 0.6)'
            });
        }

        function loadStrategy() {

        }

        function formatCollapseRow(workerName) {
            return '<div class="collapse-container">' +
                '<h2>' + workerName + ' - 过去24小时算力</h2>' +
                '<div class="chart-container" style="width: 100%; height: 320px;"></div>';
        }

        function initWorkerChart($el, workerName) {
            var singleWorkerChart = echarts.init($el.get(0));
            singleWorkerChart.setOption(CHART_OPTION);
            singleWorkerChart.setOption({
                xAxis: {
                    axisLabel: {
                        formatter: function (val) {
                            return moment(new Date(parseInt(val, 10))).format('MM-DD HH:mm');
                        }
                    }
                }
            });
            bindChartResize(singleWorkerChart);
            singleWorkerChart.showLoading({
                text: 'loading...',
                color: '#2889fc',
                maskColor: 'rgba(255, 255, 255, 0.1)'
            });
            singleWorkerChart.resize();
        }

        function renderChart(chart, tickValues, hashrateHistory, rejectedHistory) {
            var $chartContainer = $(chart.getDom());
            var interval;
            var isMainChart = false;
            if ($chartContainer.is('#chart')) isMainChart = true;
            if (isMainChart) {
                interval = 3600 * 1000 * (CHART_INTERVAL === '30min' ? 2 : 48);
            } else {
                interval = 3600 * 1000 * 2;
            }
//x axis 的最小值
            var min = tickValues ? tickValues[0] : ([hashrateHistory.values[0] ? hashrateHistory.values[0][0] : 0]);
            var series_name = 'ETH';
            var unit = hashrateHistory.key.split(' ')[1];
            var option = {
                tooltip: {
                    formatter: function (params) {
                        var ret = params.length > 0 ? '<div class="chart-tooltip-date">' +
                            moment(new Date(parseInt(params[0].value, 10))).format(isMainChart && CHART_INTERVAL === '1d' ? 'MM-DD' : 'MM-DD HH:mm') + '</div>' : '';
                        params.forEach(function (item) {
                            ret += '<div class="chart-tooltip-item"><span class="marker">' + item.marker + '</span>' +
                                html_escape(item.seriesName) + ': <strong>' + item.data[1] + '</strong></div>';
                        });
                        return '<div class="chart-tooltip-content">' + ret + '</div>';
                    }
                },
                xAxis: {
                    min: min,
                    interval: IS_MOBILE ? interval * 1.5 : interval,
                    axisLabel: {
                        rotate: $chartContainer.width() < 1000 ? 40 : 0,
                    }
                },
                yAxis: [{
                    name: '算力' + ' ' + unit,
                    nameTextStyle: {
                        padding: [0, 0, 0, 24]
                    },
                }],
                series: [{
                    name: series_name,
                    data: hashrateHistory.values.map(formatSeriesData)
                }]
            };

            if (rejectedHistory && $chartContainer.is('#chart')) {
                if (rejectedHistory.values.filter(function (item) {
                    return item[1] > 0;
                }).length > 0) {
                    option.yAxis[1] = {
                        name: '拒绝率' + ' (%)',
                        max: 100,
                    };
                    option.series[1] = {
                        name: '拒绝率',
                        data: rejectedHistory.values.map(formatRejectedData)
                    }
                } else {
                    option.yAxis[1] = {name: ''};
                    option.series[1] = {
                        name: '',
                        data: []
                    };
                }
            }
            chart.setOption(option);
        }

        function formatSeriesData(i) {
            return [i[0], i[1].toFixed(1)];
        }

        function formatRejectedData(i) {
            return [i[0], i[1].toFixed(2)];
        }

// chart size refresh
        function bindChartResize(chart) {
            var $chartContainer = $(chart.getDom());
            $(window).resize(function () {
                chart.resize();
                chart.setOption({
                    xAxis: {
                        axisLabel: {
                            rotate: $chartContainer.width() < 1000 ? 40 : 0,
                        }
                    }
                });
            });
        }

        function bindTogglePeriod() {
            $('.page-address .period-toggle .btn').on('click', function () {
                var $title = $('.toggle-control-container h4');
                var period = $(this).find('input').data('val');
                if (period === CHART_INTERVAL) return;
                CHART_INTERVAL = period;
                $title.text($title.text().split('-')[0] + ' - ' +
                    (period === '1d' ? '过去30天算力' : '过去24小时算力'));
                getHashrateData();
            });
        }

        function bindListTab() {
            $('.address-table-container .list-tab .nav-link').on('show.bs.tab', function () {
                $('.worker-filter').toggle($(this).data('key') === 'workers');
                $('.export-container').toggle($(this).data('key') === 'payouts');
                if (WORKER_TABLE) {
                    $(WORKER_TABLE.table().container()).css('display', $(this).data('key') === 'workers' ? 'block' : 'none');
                    WORKER_TABLE.fixedHeader.adjust();
                }
            });
        }

        function bindMobileSort() {
            var $body = $('body');
            var $sortContainer = $('.list-sort-container');
            $('.list-sort-content').on('show.bs.collapse', function () {
                $body.addClass('modal-open modal-list-sort-open');
                $sortContainer.find('.worker-filter-container').hide().collapse('hide');
                if (!$sortContainer.hasClass('fix-top')) {
                    $sortContainer.addClass('fix-top');
                    if (!$('header.header').hasClass('header-fix-top')) $(window).scrollTop(0);
                }
                if ($body.find('.list-backdrop').length === 0) {
                    $body.append($('<div class="list-backdrop show"></div>'));
                } else {
                    $body.find('.list-backdrop').addClass('show');
                    ;
                }
            }).on('hidden.bs.collapse', function () {
                if ($('.list-sort-content.show').length > 0 ||
                    ($('.list-sort-content.collapsing').length > 0 && !$('.list-sort-content.collapsing').is($(this)))) {
                    return false;
                }
                $body.removeClass('modal-open modal-list-sort-open');
                $body.find('.list-backdrop').remove();
                ;
                $sortContainer.find('.worker-filter-container').show();
                $sortContainer.removeClass('fix-top');
            }).on('click', '.item', function () {
                $('.list-sort-content').collapse('hide');
            });
            $('.collapse-table-sort .item').on('click', function () {
                var $item = $(this);
                var sortKey = $item.data('sort');
                var sortType = $item.data('type');
                $item.addClass('active').siblings().removeClass('active');
                $('.col-sort .sortable').removeClass('desc asc');
                $('.list-sort-btn.sort .btn').find('span').text($item.text());
                if (!WORKER_TABLE) return;
                if (sortKey) {
                    var config = [{
                        data: 'worker_name',
                        orderData: 0
                    }, {
                        data: 'hashrate',
                        orderData: 2
                    }, {
                        data: 'hashrate_last_day',
                        orderData: 3
                    }, {
                        data: 'stalerate',
                        orderData: 4
                    }, {
                        data: 'last_share',
                        orderData: 5
                    }];
                    var item = config.find(function (i) {
                        return i.data === sortKey;
                    });
                    if (item) {
                        WORKER_TABLE.order([item.orderData, sortType]).draw();
                    }
                }
            });
            $(document).on('click touchstart', function (e) {
                if ($body.hasClass('modal-list-sort-open')) {
                    var $toggle = $('.list-sort-content');
                    if (!$toggle.is(e.target) && $toggle.has(e.target).length === 0) {
                        $toggle.collapse('hide');
                    }
                }
            });
        }

        function bindWinResize() {
            var $win = $(window);
            WIN_WIDTH = $win.width();
            $(window).resize(function () {
                var winWidth = $(window).width();
                var table = WORKER_TABLE;
                if (!WORKER_TABLE) return;
                if (winWidth > 991 && WIN_WIDTH <= 991) {
                    $('header.header').removeClass('header-white header-fix-top header-no-banner');
                    IS_MOBILE = false;
                    WORKER_TABLE.fixedHeader.headerOffset($('.page-wrapper.has-tips').length > 0 ? 232 : 192);
                    if (STICKY_LIST_TAB_CONTAINER) {
                        STICKY_LIST_TAB_CONTAINER.update({});
                    } else {
                        STICKY_LIST_TAB_CONTAINER = stickybits('.list-tab-container', {
                            stickyBitStickyOffset: $('.page-wrapper.has-tips').length > 0 ? 108 : 68,
                            useStickyClasses: true
                        });
                    }
                    STICKY_WORKER_STATUS_FILTER.update({
                        stickyBitStickyOffset: $('.page-wrapper.has-tips').length > 0 ? 184 : 144,
                    });
                    STICKY_LIST_TAB_CONTAINER.update();
                    STICKY_WORKER_STATUS_FILTER.update();
                } else if (winWidth <= 991 && WIN_WIDTH > 991) {
                    $('header.header').addClass('header-white header-fix-top header-no-banner');
                    IS_MOBILE = true;
                    if (STICKY_LIST_TAB_CONTAINER) {
                        STICKY_LIST_TAB_CONTAINER.cleanup();
                    }
                    WORKER_TABLE.fixedHeader.headerOffset($('.page-wrapper.has-tips').length > 0 ? 190 : 150);
                    STICKY_WORKER_STATUS_FILTER.update({
                        stickyBitStickyOffset: $('.page-wrapper.has-tips').length > 0 ? 136 : 96,
                    });
                    STICKY_LIST_TAB_CONTAINER.update();
                    STICKY_WORKER_STATUS_FILTER.update();
                }
                WIN_WIDTH = winWidth;
            });
        }

        function bindMobileWorkerDetail() {
            var $table = $('.worker-table .table');
            var $modal = $('.modal-worker-detail');
            var $containerInfo = $modal.find('.container-info');
            $table.on('click', 'tbody td:not(.dataTables_empty)', function () {
                if (WIN_WIDTH > 991) return;
                var $tr = $(this).parents('tr');
                var row = $table.DataTable().row($tr);
                var rowData = row.data();
                var originName = $tr.data('name');
                location.hash = originName;
                $modal.data('workerData', {
                    origin_name: originName,
                    hashrate: rowData[2],
                    hashrate_last_day: rowData[3],
                    local_hash: rowData[1],
                    stalerate: rowData[4],
                    last_share: rowData[14] ? renderLastShare(rowData[14], rowData[7]) : '',
                    group: rowData[8],
                }).modal('show');
            });
            $modal.on('shown.bs.modal', function () {
                var data = $modal.data('workerData');
                var temp = [{
                    title: '15分钟算力',
                    value: data.hashrate,
                }, {
                    title: '24小时算力',
                    value: data.hashrate_last_day,
                },

                    {
                        title: '本地算力',
                        value: data.local_hash,
                    },

                    {
                        title: '拒绝率',
                        value: data.stalerate,
                    }, {
                        title: '最近提交时间',
                        value: data.last_share,
                    },

                    {
                        title: '组名',
                        value: data.group
                    }

                ];
                initWorkerChart($modal.find('.container-worker-chart'), data.origin_name);
                $modal.find('.modal-page-header span').text(data.origin_name);
                var html = '';
                $.each(temp, function () {
                    html += '<div class="item"><span class="title">' + this.title + '</span>' +
                        '<span class="value">' + this.value + '</span></div>';
                });
                $('.modal-worker-detail .container-info').html(html);
            }).on('click touchstart', '.btn-back', function () {
                location.hash = '';
                $modal.modal('hide');
            });
            $(window).on('hashchange', function () {
                if (!location.hash.split('#')[1]) {
                    $modal.modal('hide');
                }
            });
        }

        function bindMobileSearch() {
            $('#workerFilterContainer').on('show.bs.collapse', function () {
                var headHeight = $('.page-wrapper.has-tips').length > 0 ? 88 : 48;
                $('html, body').animate({'scrollTop': $('.list-sort-container').offset().top - headHeight}, 600);
                $('.worker-grid-header').css({
                    paddingTop: '58px',
                    marginTop: '-58px'
                });
                $('body').addClass('worker-filter-shown');
            }).on('shown.bs.collapse', function () {
                $(this).find('.search-worker-name').focus();
            }).on('hidden.bs.collapse', function () {
                $(this).find('.search-worker-name').blur();
                $('.worker-grid-header').css({
                    paddingTop: 0,
                    marginTop: 0
                });
                $('body').removeClass('worker-filter-shown');
            });
        }

        function formatTimestamp(container) {
            var $container = $(container || 'body');
            $container.find('.js-format-timestamp').each(function () {
                var $this = $(this);
                $this.text(formatTimestampUptoMinute($this.data('timestamp')));
            });
        }

        function bindTransferDetail() {
            var $modal = $('#modal-transfer-detail');
            var $noDataTip = $modal.find('.no-data-tip');
            var $table = $modal.find('.table-transfer-detail');
            $modal.on('show.bs.modal', function () {
                var $table = $modal.find('.table-transfer-detail');
            }).on('click', '.btn-export-transfer-detail', function () {
                var data = $table.data('originData');
                if (!data) {
                    e.preventDefault();
                    return false;
                }
                exportTableToCsv(this, data, '0x62dD3a1d95DB1E4BeD53001291BF04c3f689B515');
            });
        }

        function exportTableToCsv(aLink, data, user) {
            var str = '日期,' + '出租方帐户,' + '出租总算力,' + '实际有效算力,\r\n';
            str += data.map(function (item) {
                return moment(item.timestamp * 1000).format('YYYY-MM-DD HH:mm') + ',' +
                    item.sell_name + ',' +
                    item.hashes_order + ' T,' +
                    item.hashes_real + ' T,' + '\r\n';
            }).join('');
            $(aLink).attr('download', 'transfer_detail_' + user + '.csv');
            aLink.href = 'data:text/csv;charset=utf-8,\ufeff' + encodeURIComponent(str);
        }

        function formatVisualMapPieces(data) {
            var pieces = [];
            var markArea = [];
            var cur = {
                currency: data[0][2] || 'default',
                timestamp: data[0][0],
                value: data[0][1],
            };
            data.forEach(function (val, idx) {
                if (val[2] !== cur.currency) {
                    pieces.push({
                        gte: cur.timestamp,
                        lt: val[0],
                        color: SWITCH_COLOR_CONF[cur.value == 0 ? (cur.currency || 'default') : cur.currency].line,
                    });
                    addMark(val, cur)
                    cur = {
                        currency: val[2] ? val[2] : 'default',
                        timestamp: val[0],
                        value: val[1],
                    };
                }
                if (idx === data.length - 1) {
                    pieces.push({
                        gte: cur.timestamp,
                        color: SWITCH_COLOR_CONF[cur.currency || 'default'].line,
                    });
                    addMark(val, cur);
                }
            });
            if (pieces.length === 1) {
                pieces[0].lt = data[data.length - 1][0];
            }
            return {pieces: pieces, markArea: markArea};

            function addMark(data, cur) {
                markArea.push([{
                    name: cur.currency === 'default' ? '' : cur.currency.toUpperCase(),
                    xAxis: cur.timestamp,
                    itemStyle: {
                        color: {
                            type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: SWITCH_COLOR_CONF[cur.value == 0 ? (cur.currency || 'default') : cur.currency].area[1]
                            }, {
                                offset: 1,
                                color: SWITCH_COLOR_CONF[cur.value == 0 ? (cur.currency || 'default') : cur.currency].area[0]
                            }],
                        },
                        opacity: 0.6,
                    }
                }, {
                    xAxis: data[0],
                }]);
            }
        }

        function initAutoSwitch() {
            $.each(SWITCH_CURRENCY, function (idx) {
                SWITCH_COLOR_CONF[this] = SWITCH_COLOR[idx];
            });
            SWITCH_COLOR_CONF.default = COLOR_ZERO;
            $('.chart-extra-info').html('<div class="auto-switch-legend">' + SWITCH_CURRENCY.map(function (a) {
                return '<div class="d-inline-block item"><span class="icon" style="border-color: ' +
                    SWITCH_COLOR_CONF[a].line + '; background: ' +
                    SWITCH_COLOR_CONF[a].area[1] + '"></span><span class="title">' + a.toUpperCase() + '</span></div>';
            }).join('') + '</div>');
        }

        function bindCarousel() {
            if (Modernizr.touch) {
                $("#payoutsCarousel").swipe({
                    swipe: function (event, direction, distance, duration, fingerCount, fingerData) {
                        if (direction == 'left') $(this).carousel('next');
                        if (direction == 'right') $(this).carousel('prev');
                    },
                    allowPageScroll: "vertical"
                });
            } else {
                $('.alert').removeClass('hidden');
            }
        }

        function initCopyBtn(className) {
            var clip;
            if (className == '.btn-copy') {
                clip = new ClipboardJS(className, {
                    target: function (trigger) {
                        return $(trigger).prev().get(0);
                    }
                })
            } else if (className == '.btn-copy-input') {
                clip = new ClipboardJS(className, {
                    target: function (trigger) {
                        return $(trigger).parents('.input-group-append').prev().get(0);
                    }
                })
            }
            clip.on('success', function () {
                $('.status-toast').remove();
                $('body').append('<div class="status-toast">已复制!</div>');
                $('.status-toast').delay(5000).hide(0);
            });
            clip.on('error', function () {
                $('.status-toast').remove();
                $('body').append('<div class="status-toast fail">复制失败!</div>');
                $('.status-toast').delay(5000).hide(0);
            });
        }
    });
</script>


<div id="J_newMsOrderChromeExtReady" data-version="3.1.0"></div>
<input type="hidden" name="newestMsOrderPluginVersion" id="J_newestMsOrderPluginVersion" value="3.1.0"></body>
</html>